Neither on Windows XP, 7 nor 10 the errorlevel is changed when setting / changing the value of an environment variable with SET. This patch emulates this behavior, retaining the previous value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47791 Signed-off-by: Florian Eder others.meder@gmail.com --- programs/cmd/builtins.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c index 502694ffc46..d593580a46b 100644 --- a/programs/cmd/builtins.c +++ b/programs/cmd/builtins.c @@ -4218,7 +4218,7 @@ void WCMD_setshow_env (WCHAR *s) { if ((!status) & (gle == ERROR_ENVVAR_NOT_FOUND)) { errorlevel = 1; } else if (!status) WCMD_print_error(); - else errorlevel = 0; + else return; } }
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=91481
Your paranoid android.
=== debiant2 (32 bit report) ===
cmd.exe: batch.c:321: Test failed: unexpected char 0x31 position 0 in line 448 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 452 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 454 (got '1', wanted '0')
=== debiant2 (32 bit Chinese:China report) ===
cmd.exe: batch.c:321: Test failed: unexpected char 0x31 position 0 in line 448 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 452 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 454 (got '1', wanted '0')
=== debiant2 (32 bit WoW report) ===
cmd.exe: batch.c:321: Test failed: unexpected char 0x31 position 0 in line 448 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 452 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 454 (got '1', wanted '0')
=== debiant2 (64 bit WoW report) ===
cmd.exe: batch.c:321: Test failed: unexpected char 0x31 position 0 in line 448 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 452 (got '1', wanted '0') batch.c:321: Test failed: unexpected char 0x31 position 0 in line 454 (got '1', wanted '0')