Skip to content

Commit

Permalink
configure: don't set ensure if tarball is set
Browse files Browse the repository at this point in the history
If you're providing a path to a header tarball to install, you probably
want it to always be re-installed.

Fixes: nodejs#1216
  • Loading branch information
gibfahn committed Jun 2, 2017
1 parent b5b52f7 commit edb4aef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ function configure (gyp, argv, callback) {
return callback(new Error('Invalid version number: ' + release.version))
}

// ensure that the target node version's dev files are installed
gyp.opts.ensure = true
// If the tarball option is set, always remove and reinstall the headers
// into devdir. Otherwise only install if they're not already there.
gyp.opts.ensure = gyp.opts.tarball ? false : true

gyp.commands.install([ release.version ], function (err, version) {
if (err) return callback(err)
log.verbose('get node dir', 'target node version installed:', release.versionDir)
Expand Down

0 comments on commit edb4aef

Please sign in to comment.