Overview
| Artifact ID: | 59bc7fa31a21a559f2f7e4169eb8e70b74940f180cede35b69c6ad293f1a14d1 |
|---|---|
| Ticket: | f91ab723f3dfbc0d2b720a70a1fa09eebfa1cde5
exec+wish fails to handle windows batch file with arguments and spaces |
| User & Date: | anonymous on 2024-02-22 21:36:06 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-plain"
- comment changed to:
Reproduce the error with the following code run in wish console on Windows. Note that this works fine in tclsh: #Test4: set batFile {C:\batTest\bat test\test.bat} set arg1 {arg with spaces} set arg2 8 set command [list $batFile $arg1 $arg2] exec {*}$command Output: 'C:\batTest\bat' is not recognized as an internal or external command, operable program or batch file. Where the bat file just outputs all arguments given: @echo off (for %%a in (%*) do ( echo %%a )) Proper output can be reproduced if the space if removed from the bat file path or the argument: (bin) 54 % #Test1: set batFile {C:\batTest\bat test\test.bat} set arg1 {argNoSpaces} set arg2 8 set command [list $batFile $arg1 $arg2] exec {*}$command Output: argNoSpaces 8 (bin) 64 % #Test3: set batFile {C:\batTest\test.bat} set arg1 {arg with spaces} set arg2 8 set command [list $batFile $arg1 $arg2] exec {*}$command Output: "arg with spaces" 8 I have tested this in an older version of tcl (8.5.9) and it works fine. - foundin changed to: "8.6.13"
- is_private changed to: "0"
- login: "anonymous"
- priority changed to: "5 Medium"
- private_contact changed to: "21e0fa2b63977f4985a360a3d6914b25a98dd2d0"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "anonymous"
- subsystem changed to: "16. Commands A-H"
- title changed to:
exec+wish fails to handle windows batch file with arguments and spaces
- type changed to: "Bug"