piuccio / sublime-esformatter

JavaScript formatter plugin for Sublime Text
MIT License
28 stars 20 forks source link

getNpmGlobalRoot fails on Windows #58

Closed jan11011977 closed 8 years ago

jan11011977 commented 8 years ago

getNpmGlobalRoot currently always fails on Windows because it's not searching for "npm" in the path.

This can be easily fixed by adding "shell=True" to line 19 of esformatter.py, like so:

    return subprocess.check_output(["npm", "root", "-g"], shell=True).rstrip().decode('utf-8')

Thanks

piuccio commented 8 years ago

mind creating a PR?

piuccio commented 8 years ago

Things have changed a bit with 2.0.0, I'm closing this, let me know if you still have problems