https://bugs.winehq.org/show_bug.cgi?id=47791
Bug ID: 47791 Summary: Inconsistent %ERRORLEVEL% after setting env var value in cmd.exe Product: Wine Version: 4.16 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: lois.diqual@gmail.com Distribution: ---
Deleting an environment variable on cmd.exe seems to return %ERRORLEVEL% 1, while on windows' cmd.exe it returns 0.
This matters because some core visual studio scripts like vsdevcmd.bat rely on this behavior to set the environment properly. Note that using windows' cmd on wine (using winetricks cmd) yields the same incorrect results.
On wine's cmd.exe -----------------
wineuser@b081d9035bff:/$ wine cmd Microsoft Windows 10.0.10240
Z:>set DOES_NOT_EXIST=
Z:>echo %ERRORLEVEL% 1
On windows 10's cmd.exe -----------------------
Microsoft Windows [Version 10.0.17763.379] (c) 2018 Microsoft Corporation. All rights reserved.
C:\Users\IEUser>set DOES_NOT_EXIST=
C:\Users\IEUser>echo %ERRORLEVEL% 0
https://bugs.winehq.org/show_bug.cgi?id=47791
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=47791
jinoh.kang.kr@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jinoh.kang.kr@gmail.com
--- Comment #1 from jinoh.kang.kr@gmail.com --- Also, the SET command shall leave ERRORLEVEL unchanged if the specified variable was successfully changed. See https://ss64.com/nt/set.html
https://bugs.winehq.org/show_bug.cgi?id=47791
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |617d14bc1238b57327a8400eda1 | |c1ab22624beb7 CC| |infyquest@gmail.com Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Vijay Kamuju infyquest@gmail.com --- Fix committed https://source.winehq.org/git/wine.git/commitdiff/617d14bc1238b57327a8400eda...
https://bugs.winehq.org/show_bug.cgi?id=47791
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #3 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.12.
https://bugs.winehq.org/show_bug.cgi?id=47791
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6.0.x
https://bugs.winehq.org/show_bug.cgi?id=47791
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|6.0.x |---
--- Comment #4 from Michael Stefaniuc mstefani@winehq.org --- Removing the 6.0.x milestone from bug fixes included in 6.0.3.