diff --git a/src/atom.coffee b/src/atom.coffee index 707500479..fc4f59ef2 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -581,9 +581,9 @@ class Atom extends Model {resourcePath, safeMode} = @getLoadSettings() CommandInstaller = require './command-installer' - CommandInstaller.installAtomCommand resourcePath, false, (error) -> + CommandInstaller.installAtomCommand false, (error) -> console.warn error.message if error? - CommandInstaller.installApmCommand resourcePath, false, (error) -> + CommandInstaller.installApmCommand false, (error) -> console.warn error.message if error? dimensions = @restoreWindowDimensions() diff --git a/src/command-installer.coffee b/src/command-installer.coffee index b9d40bce0..c7772b4f5 100644 --- a/src/command-installer.coffee +++ b/src/command-installer.coffee @@ -36,12 +36,11 @@ module.exports = message: "Failed to install shell commands" detailedMessage: error.message - resourcePath = process.resourcesPath - @installAtomCommand resourcePath, true, (error) => + @installAtomCommand true, (error) => if error? showErrorDialog(error) else - @installApmCommand resourcePath, true, (error) -> + @installApmCommand true, (error) -> if error? showErrorDialog(error) else @@ -49,12 +48,12 @@ module.exports = message: "Commands installed." detailedMessage: "The shell commands `atom` and `apm` are installed." - installAtomCommand: (resourcePath, askForPrivilege, callback) -> - commandPath = path.join(resourcePath, 'atom.sh') + installAtomCommand: (askForPrivilege, callback) -> + commandPath = path.join(process.resourcesPath, 'atom.sh') @createSymlink commandPath, askForPrivilege, callback - installApmCommand: (resourcePath, askForPrivilege, callback) -> - commandPath = path.join(resourcePath, 'apm', 'node_modules', '.bin', 'apm') + installApmCommand: (askForPrivilege, callback) -> + commandPath = path.join(process.resourcesPath, 'apm', 'node_modules', '.bin', 'apm') @createSymlink commandPath, askForPrivilege, callback createSymlink: (commandPath, askForPrivilege, callback) ->