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 Jun 7, 2017
1 parent 75cfae2 commit c84a541
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 c84a541

Please sign in to comment.