mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 23:17:16 +03:00
Don't use the npm binary you're about to delete
This commit is contained in:
parent
d0811b82ed
commit
347da770dc
@ -76,8 +76,8 @@ function getApmBinPath () {
|
||||
return path.join(apmRootPath, 'node_modules', 'atom-package-manager', 'bin', apmBinName)
|
||||
}
|
||||
|
||||
function getNpmBinPath () {
|
||||
function getNpmBinPath (external = false) {
|
||||
const npmBinName = process.platform === 'win32' ? 'npm.cmd' : 'npm'
|
||||
const localNpmBinPath = path.resolve(repositoryRootPath, 'script', 'node_modules', '.bin', npmBinName)
|
||||
return fs.existsSync(localNpmBinPath) ? localNpmBinPath : npmBinName
|
||||
return !external && fs.existsSync(localNpmBinPath) ? localNpmBinPath : npmBinName
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user