[Bug 59234] New: Wine: Windows batch "WHERE" command return a wrong exit code in quiet mode
http://bugs.winehq.org/show_bug.cgi?id=59234 Bug ID: 59234 Summary: Wine: Windows batch "WHERE" command return a wrong exit code in quiet mode Product: Wine Version: 10.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@list.winehq.org Reporter: charles@magicorp.fr Distribution: --- When we use the "WHERE" command in a batch script, the exit code indicates whether an executable file exists or not. For example, to find the `explorer.exe` path, we use `WHERE explorer`, which returns an exit code success and print the path list: ```txt C:\windows\system32\explorer.exe C:\windows\explorer.exe ``` It's possible to use the "WHERE" command in quiet mode to only return the exit code and not print anything. For example, to know if `explorer.exe` exists, we use `WHERE /Q explorer`, which returns an exit code success. This works on Windows, but on Wine, the quiet mode fails. To reproduce, execute the following batch script: ```bat WHERE /Q explorer && (ECHO SUCCESS) || (ECHO FAILED) WHERE explorer && (ECHO SUCCESS) || (ECHO FAILED) ``` On Windows, that script returns: ```txt C:\Users\charles\Downloads>WHERE /Q explorer && (ECHO SUCCESS ) || (ECHO FAILED ) SUCCESS C:\Users\charles\Downloads>WHERE explorer && (ECHO SUCCESS ) || (ECHO FAILED ) C:\Windows\explorer.exe SUCCESS ``` On Linux (Wine), `wine reproduce.bat`, that script returns: ```txt Z:\home\charles\a>WHERE /Q explorer && (ECHO SUCCESS) || (ECHO FAILED) FAILED Z:\home\charles\a>WHERE explorer && (ECHO SUCCESS) || (ECHO FAILED) C:\windows\system32\explorer.exe C:\windows\explorer.exe SUCCESS ``` -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59234 thc.fr13nd@gmail.com <thc.fr13nd@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thc.fr13nd@gmail.com --- Comment #1 from thc.fr13nd@gmail.com <thc.fr13nd@gmail.com> --- wine does not support /Q with where command atm: From log: 0140:fixme:where:wmain Unsupported option /Q -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59234 Austin English <austinenglish@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |programs Keywords| |download Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Austin English <austinenglish@gmail.com> --- Confirming. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59234 --- Comment #3 from thc.fr13nd@gmail.com <thc.fr13nd@gmail.com> --- MR https://gitlab.winehq.org/wine/wine/-/merge_requests/9975 adds quiet mode -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59234 Eric Pouech <eric.pouech@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |eric.pouech@gmail.com Status|NEW |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |e53db200ca08f0aeb196617fa02 | |38a776be2b7f8 --- Comment #4 from Eric Pouech <eric.pouech@gmail.com> --- fixed by MR!9975 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59234 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.2. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla