From 9df7ea91dbb0b2224a10fe62df68039765fe93c5 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 20 Jan 2015 14:42:45 -0800 Subject: [PATCH] Use new apm path on all platforms --- build/tasks/build-task.coffee | 7 +++---- src/package-manager.coffee | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/build/tasks/build-task.coffee b/build/tasks/build-task.coffee index b2eca2778..f49e1ac49 100644 --- a/build/tasks/build-task.coffee +++ b/build/tasks/build-task.coffee @@ -145,10 +145,9 @@ module.exports = (grunt) -> cp 'src', path.join(appDir, 'src'), filter: /.+\.(cson|coffee)$/ cp 'static', path.join(appDir, 'static') - if process.platform is 'win32' - cp path.join('apm', 'node_modules', 'atom-package-manager'), path.join(appDir, 'apm'), filter: filterNodeModule - else - cp 'apm', path.join(appDir, 'apm'), filter: filterNodeModule + cp path.join('apm', 'node_modules', 'atom-package-manager'), path.join(appDir, 'apm'), filter: filterNodeModule + if process.platform isnt 'win32' + fs.symlinkSync(path.join('..', '..', 'bin', 'apm'), path.join(appDir, 'apm', 'node_modules', '.bin', 'apm')) if process.platform is 'darwin' grunt.file.recurse path.join('resources', 'mac'), (sourcePath, rootDirectory, subDirectory='', filename) -> diff --git a/src/package-manager.coffee b/src/package-manager.coffee index a397843ba..29aa107ac 100644 --- a/src/package-manager.coffee +++ b/src/package-manager.coffee @@ -128,10 +128,9 @@ class PackageManager # # Return a {String} file path to apm. getApmPath: -> - if process.platform is 'win32' - @apmPath ?= path.resolve(__dirname, '..', 'apm', 'bin', 'apm.cmd') - else - @apmPath ?= path.resolve(__dirname, '..', 'apm', 'node_modules', 'atom-package-manager', 'bin', 'apm') + commandName = 'apm' + commandName += '.cmd' if process.platform is 'win32' + @apmPath ?= path.resolve(__dirname, '..', 'apm', 'bin', commandName) # Public: Get the paths being used to look for packages. #