Duroktar / vscode-npm-scripts

View and run NPM scripts in the sidebar
MIT License
28 stars 13 forks source link

Issue when running scripts containing spaces #13

Open TheDSCPL opened 5 years ago

TheDSCPL commented 5 years ago

Hey!

I've detected a bug when the script's name contains spaces.

In my case, I have 2 scripts: "compile" and "deploy". Then I have a third script "compile and deploy". When I run this one with your tool, it runs "npm run compile and deploy", which creates an error because it tries to run the scripts "compile", "and" and then "deploy", which was not the intended behaviour!

I believe there is an easy fix: quote the script's name. Instead of running "npm run compile and deploy", run "npm run 'compile and deploy'".