Timeline for Powershell: Start-Process with a file variable
Current License: CC BY-SA 4.0
3 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 12 at 16:39 | comment | added | mklement0 |
For now, using a single string that encodes all arguments, each enclosed in embedded "..." quoting if necessary (-ArgumentList "-noexit -file `"$a`""), is therefore preferable. As discussed in the original bug report, GitHub issue #5576, an alternative -ArgumentArray parameter that supports robust array-based argument passing may be introduced in the future.
|
|
| Apr 12 at 16:39 | comment | added | mklement0 |
While passing pass-through arguments individually to -ArgumentList, as the elements of an array may conceptually be preferable, it is unfortunately marred by a long-standing bug in Start-Process that will not be fixed as such, so as not to break backward compatibility; in short, array elements that (may) contain spaces must unexpectedly be enclosed in embedded double quotes (-ArgumentList '-noexit', '-file', "`"$a`"").
|
|
| Sep 5, 2024 at 5:04 | history | answered | Berend Engelbrecht | CC BY-SA 4.0 |