Commit 4f71f4af authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd: Fix "PATH=value" command.

parent 682b276a
......@@ -2371,7 +2371,7 @@ void WCMD_setshow_path (const WCHAR *command) {
static const WCHAR pathW[] = {'P','A','T','H','\0'};
static const WCHAR pathEqW[] = {'P','A','T','H','=','\0'};
if (strlenW(param1) == 0) {
if (strlenW(param1) == 0 && strlenW(param2) == 0) {
status = GetEnvironmentVariableW(pathW, string, sizeof(string)/sizeof(WCHAR));
if (status != 0) {
WCMD_output_asis ( pathEqW);
......
......@@ -1530,6 +1530,17 @@ if d==d goto dest4
:dest4@space@
echo goto with a following space worked
echo ------------ Testing PATH ------------
set backup_path=%path%
set path=original
path
path try2
path
path=try3
path
set path=%backup_path%
set backup_path=
echo ------------ Testing combined CALLs/GOTOs ------------
echo @echo off>foo.cmd
echo goto :eof>>foot.cmd
......
......@@ -825,6 +825,10 @@ goto with no leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with a following space worked
------------ Testing PATH ------------
PATH=original
PATH=try2
PATH=try3
------------ Testing combined CALLs/GOTOs ------------
world
cheball
......
Markdown is supported
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