mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-26 02:05:31 +00:00
The SDK process functions and the daemon's terminals each had their own cmd.exe escaper, and the SDK's quote-region tracker let a set variable such as %PATH% expand inside a quoted argument to a .cmd or .bat launcher. Both now build the line with windowsCommandLine and start cmd.exe /d /s /c "<line>" with verbatim arguments. An argument without a cmd.exe metacharacter stays as given, so builtins and %1 readers get it unchanged. Any other argument is quoted and caret-escaped the qntm way (cross-spawn's escape.js), so cmd.exe never sees a quoted region and never expands %NAME%. A batch script that reads an argument with a quote again gets it escaped twice. A bare name is found on PATH with PATHEXT without changing the daemon's working directory: a program starts directly, a .cmd or .bat shim goes through cmd.exe, and an unknown name goes through cmd.exe as a builtin. A shell other than cmd.exe gets the arguments as given. Terminals keep turning a prompt's line breaks into spaces; the SDK still refuses them.