tools: fix setting path containing an ampersand

This commit fixes an issue with the Node.js command prompt
on Windows where the PATH environment variable would not be
set correctly if the existing PATH contained an '&'.

Fixes: https://github.com/nodejs/node/issues/4802
PR-URL: https://github.com/nodejs/node/pull/4804
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Brian White 2016-01-21 16:20:23 -05:00
parent 17d5a3ab99
commit 922d53897d

View File

@ -1,7 +1,7 @@
@echo off
rem Ensure this Node.js and npm are first in the PATH
set PATH=%APPDATA%\npm;%~dp0;%PATH%
set "PATH=%APPDATA%\npm;%~dp0;%PATH%"
setlocal enabledelayedexpansion
pushd "%~dp0"