hughsk / atom-npm-install

Automatically install and save any missing npm modules being used in the current file
http://atom.io/packages/npm-install
MIT License
80 stars 7 forks source link

Support windows (npm executable is different) #3

Closed guillaume86 closed 10 years ago

guillaume86 commented 10 years ago

Hi,

On windows the npm executable file is npm.cmd, I fixed the package locally using:

line  14 +     var platform = require('os').platform
line  28 +     var npmExecutable = (platform() === "win32" ? "npm.cmd" : "npm")
line 138 -     npm = spawn('npm', [
line 138 +     npm = spawn(npmExecutable, [

Sorry the manal patch I'm new to atom, I guess there is a way to generate a fork + pull request from the package easily from atom since it's a github product but I'm a bit in a hurry.

hughsk commented 10 years ago

Cool, will update. For future reference, you can use the edit button when viewing a file on GitHub for speedy pull requests:

screenshot_2014-08-20_8 48 56 pm

guillaume86 commented 10 years ago

Thanks for the tip