mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Fallback to /usr/local/bin/atom
This commit is contained in:
6
Rakefile
6
Rakefile
@@ -48,8 +48,12 @@ task :install => [:clean, :build] do
|
||||
# Install atom cli
|
||||
if File.directory?("/opt/boxen")
|
||||
cli_path = "/opt/boxen/bin/atom"
|
||||
else
|
||||
elsif File.directory?("/opt/github")
|
||||
cli_path = "/opt/github/bin/atom"
|
||||
elsif File.directory?("/usr/local")
|
||||
cli_path = "/usr/local/bin/atom"
|
||||
else
|
||||
raise "Missing directory for `atom` binary"
|
||||
end
|
||||
|
||||
FileUtils.cp("#{ATOM_SRC_PATH}/atom.sh", cli_path)
|
||||
|
||||
@@ -42,8 +42,12 @@ window.setUpEnvironment = ->
|
||||
window.startup = ->
|
||||
if fs.isDirectory('/opt/boxen')
|
||||
installAtomCommand('/opt/boxen/bin/atom')
|
||||
else
|
||||
else if fs.isDirectory('/opt/github')
|
||||
installAtomCommand('/opt/github/bin/atom')
|
||||
else if fs.isDirectory('/usr/local')
|
||||
installAtomCommand('/usr/local/bin/atom')
|
||||
else
|
||||
throw "Missing directory for `atom` binary"
|
||||
|
||||
handleWindowEvents()
|
||||
config.load()
|
||||
|
||||
Reference in New Issue
Block a user