mirror of
https://github.com/atom/atom.git
synced 2026-01-25 14:59:03 -05:00
Always install commands from process.resourcesPath
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user