Florian Eder : cmd: Do not change errorlevel when setting environment variables.
Alexandre Julliard
julliard at winehq.org
Fri Jun 18 14:45:53 CDT 2021
Module: wine
Branch: master
Commit: 617d14bc1238b57327a8400eda1c1ab22624beb7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=617d14bc1238b57327a8400eda1c1ab22624beb7
Author: Florian Eder <others.meder at gmail.com>
Date: Tue Jun 1 07:02:54 2021 +0000
cmd: Do not change errorlevel when setting environment variables.
Changes CMD to set its errorlevel to 0 only when the value of an environment variable
is set in in non-interactive / batch mode, retains the previous value otherwise.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47791
Signed-off-by: Florian Eder <others.meder at gmail.com>
Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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..c7df724ae00 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 if (!interactive) errorlevel = 0;
}
}
More information about the wine-cvs
mailing list