From 9169e9e22796bb8b7aaeddf1ec5313aaffbec34a Mon Sep 17 00:00:00 2001 From: probablycorey Date: Wed, 22 Jan 2014 14:54:01 -0800 Subject: [PATCH] Verify platform inside command installer --- src/atom.coffee | 1 - src/command-installer.coffee | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/atom.coffee b/src/atom.coffee index e4e2e149f..b802ba7b0 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -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? diff --git a/src/command-installer.coffee b/src/command-installer.coffee index 2f97c7ef2..f60a606d2 100644 --- a/src/command-installer.coffee +++ b/src/command-installer.coffee @@ -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)