[PATCH] cmd: Do not change errorlevel when setting environment variables
Florian Eder
others.meder at gmail.com
Sun May 30 14:16:51 CDT 2021
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 at 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;
}
}
--
2.31.1
More information about the wine-devel
mailing list