Skip to content

Commit c84a541

Browse files
authored
configure: don't set ensure if tarball is set
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 <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 75cfae2 commit c84a541

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/configure.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@ function configure (gyp, argv, callback) {
7272
return callback(new Error('Invalid version number: ' + release.version))
7373
}
7474

75-
// ensure that the target node version's dev files are installed
76-
gyp.opts.ensure = true
75+
// If the tarball option is set, always remove and reinstall the headers
76+
// into devdir. Otherwise only install if they're not already there.
77+
gyp.opts.ensure = gyp.opts.tarball ? false : true
78+
7779
gyp.commands.install([ release.version ], function (err, version) {
7880
if (err) return callback(err)
7981
log.verbose('get node dir', 'target node version installed:', release.versionDir)

0 commit comments

Comments
 (0)