diff options
Diffstat (limited to 'use-system-apm.patch')
-rw-r--r-- | use-system-apm.patch | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/use-system-apm.patch b/use-system-apm.patch index 04246bd0416d..9cbcf8c75fb6 100644 --- a/use-system-apm.patch +++ b/use-system-apm.patch @@ -1,32 +1,37 @@ --- a/script/lib/run-apm-install.js +++ b/script/lib/run-apm-install.js -@@ -8,11 +8,8 @@ - const installEnv = Object.assign({}, process.env) +@@ -8,10 +8,7 @@ + const installEnv = Object.assign({}, process.env); // Set resource path so that apm can load metadata related to Atom. - installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath + installEnv.ATOM_RESOURCE_PATH = CONFIG.repositoryRootPath; - // Set our target (Electron) version so that node-pre-gyp can download the - // proper binaries. -- installEnv.npm_config_target = CONFIG.appMetadata.electronVersion - childProcess.execFileSync( -- CONFIG.getApmBinPath(), -+ 'apm', - ['--loglevel=error', ci ? 'ci' : 'install'], - {env: installEnv, cwd: packagePath, stdio: stdioOptions || 'inherit'} - ) +- installEnv.npm_config_target = CONFIG.appMetadata.electronVersion; +- childProcess.execFileSync(CONFIG.getApmBinPath(), [ci ? 'ci' : 'install'], { ++ childProcess.execFileSync('apm', [ci ? 'ci' : 'install'], { + env: installEnv, + cwd: packagePath, + stdio: stdioOptions || 'inherit' --- a/src/package-manager.js +++ b/src/package-manager.js -@@ -167,13 +167,7 @@ - return configPath || this.apmPath +@@ -194,19 +194,7 @@ + return configPath || this.apmPath; } -- const commandName = process.platform === 'win32' ? 'apm.cmd' : 'apm' -- const apmRoot = path.join(process.resourcesPath, 'app', 'apm') -- this.apmPath = path.join(apmRoot, 'bin', commandName) +- const commandName = process.platform === 'win32' ? 'apm.cmd' : 'apm'; +- const apmRoot = path.join(process.resourcesPath, 'app', 'apm'); +- this.apmPath = path.join(apmRoot, 'bin', commandName); - if (!fs.isFileSync(this.apmPath)) { -- this.apmPath = path.join(apmRoot, 'node_modules', 'atom-package-manager', 'bin', commandName) +- this.apmPath = path.join( +- apmRoot, +- 'node_modules', +- 'atom-package-manager', +- 'bin', +- commandName +- ); - } -- return this.apmPath -+ return '/usr/lib/node_modules/atom-package-manager/bin/apm' +- return this.apmPath; ++ return '/usr/lib/node_modules/atom-package-manager/bin/apm'; } // Public: Get the paths being used to look for packages. |