From 68fbff59d8ce1f04906f9329becce5e0867395d2 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 18 Nov 2014 13:44:08 -0800 Subject: [PATCH] Add apm command stub --- src/browser/squirrel-update.coffee | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/browser/squirrel-update.coffee b/src/browser/squirrel-update.coffee index 74c0b4462..a488177a4 100644 --- a/src/browser/squirrel-update.coffee +++ b/src/browser/squirrel-update.coffee @@ -73,6 +73,14 @@ updatePath = (callback) -> """ fs.writeFile(atomCommandPath, atomCommand, callback) + apmCommandPath = path.join(binFolder, 'apm.cmd') + relativeApmPath = path.relative(binFolder, path.join(process.resourcesPath, 'app', 'apm', 'node_modules', 'atom-package-manager', 'bin', 'atom.cmd')) + apmCommand = """ + @echo off + "%~dp0\\#{relativeApmPath}" %* + """ + fs.writeFile(apmCommandPath, apmCommand, callback) + getPath = (callback) -> spawnReg ['query', environmentKeyPath, '/v', 'Path'], (error, stdout) -> return callback(error) if error?