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.

PR-URL: #1220
Fixes: #1216
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Refael Ackermann <refack@gmail.com>
  • Loading branch information
gibfahn authored and bnoordhuis committed Jun 8, 2018
1 parent 4c38707 commit 0a07e48
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/configure.js
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 0a07e48

Please sign in to comment.