mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
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: https://github.com/nodejs/node-gyp/pull/1220 Fixes: https://github.com/nodejs/node-gyp/issues/1216 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Refael Ackermann <refack@gmail.com>
This commit is contained in:
parent
4c38707087
commit
0a07e481f7
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue