Use new apm path on all platforms

This commit is contained in:
Kevin Sawicki
2015-01-20 14:42:45 -08:00
parent 5bf0e53c01
commit 9df7ea91db
2 changed files with 6 additions and 8 deletions

View File

@@ -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) ->

View File

@@ -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.
#