Commit c08da463 authored by Ed Morley's avatar Ed Morley Committed by Fedor Indutny
Browse files

child_process: use full path for cmd.exe on Win32



Currently child_process.exec() assumes that cmd.exe is on the PATH,
and fails with a spawn ENOENT error if it is not.

The Windows 'comspec' environment variable contains the full filepath
to the default command interpreter, eg "C:\Windows\System32\cmd.exe".
Should it not be set, we fall-back to using 'cmd.exe' from PATH, as
before.

Signed-off-by: default avatarFedor Indutny <fedor@indutny.com>
parent 4f1782ef
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment