mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Verify platform inside command installer
This commit is contained in:
@@ -249,7 +249,6 @@ class Atom extends Model
|
||||
|
||||
# Private: Call this method when establishing a real application window.
|
||||
startEditorWindow: ->
|
||||
if process.platform is 'darwin'
|
||||
CommandInstaller = require './command-installer'
|
||||
CommandInstaller.installAtomCommand (error) -> console.warn error.message if error?
|
||||
CommandInstaller.installApmCommand (error) -> console.warn error.message if error?
|
||||
|
||||
@@ -27,6 +27,8 @@ module.exports =
|
||||
"/usr/local/bin"
|
||||
|
||||
install: (commandPath, callback) ->
|
||||
return unless process.platform is 'darwin'
|
||||
|
||||
commandName = path.basename(commandPath, path.extname(commandPath))
|
||||
directory = @getInstallDirectory()
|
||||
if fs.existsSync(directory)
|
||||
|
||||
Reference in New Issue
Block a user