Cannot spawn process: npm start

FreeSlave via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 4 11:41:16 PDT 2016


On Tuesday, 4 October 2016 at 17:02:34 UTC, Adam D. Ruppe wrote:
> On Tuesday, 4 October 2016 at 16:55:22 UTC, Andre Pany wrote:
>> Spawn process is working fine on linux, only on windows it 
>> doesn't work.
>> I will create a bug report.
>
> This isn't really a bug if it is a cmd file like the other 
> poster said... cmd files are scripts that need to be run 
> through the interpreter.
>
> shellExec probably handles it, or you could spawnProcess "cmd" 
> with the npm being an argument to it.

There's no shellExec, but executeShell.
spawnShell would fit better since author used spawnProcess in 
original post.

Whether spawnProcess should handle .bat and .cmd is a matter of 
function design really. Actually I would like to treat 
spawnProcess more like double-click on application and 
double-click works for scripts on windows. So there will be no 
special code for phobos user to handle this case.


More information about the Digitalmars-d-learn mailing list