diff --git a/npm/install.js b/npm/install.js index fcc2e7b07103..12d0d158e370 100755 --- a/npm/install.js +++ b/npm/install.js @@ -22,6 +22,12 @@ var paths = { win32: path.join(__dirname, './dist/atom.exe') } +var shebang = { + darwin: '#!/bin/bash\n', + linux: '#!/bin/bash\n', + win32: '' +} + var argv = { darwin: '"$@"', linux: '"$@"', @@ -33,7 +39,7 @@ if (!paths[platform]) throw new Error('Unknown platform: '+platform) nugget(url, {target:name, dir:__dirname, resume:true, verbose:true}, function(err) { if (err) return onerror(err) fs.writeFileSync(path.join(__dirname, 'path.txt'), paths[platform]) - fs.writeFileSync(path.join(__dirname, 'run.bat'), '"'+paths[platform]+'" '+argv[platform]) + fs.writeFileSync(path.join(__dirname, 'run.bat'), shebang[platform]+'"'+paths[platform]+'" '+argv[platform]) extract(path.join(__dirname, name), {dir:path.join(__dirname, 'dist')}, function(err) { if (err) return onerror(err) })