Commit a6abcdb
fix: resolve cmd.exe quoting and stdin issues in Invoke-MaskedProcess
When Invoke-MaskedProcess runs inside Start-Job (a separate process),
two issues caused failures on Windows:
1. RedirectStandardInput was false, so child processes inherited a
broken stdin handle from the job's consoleless process, causing
Python (az CLI) to hang on startup. Fixed by redirecting stdin
and closing it immediately.
2. ArgumentList individually quotes each argument, but cmd.exe /c
has its own quoting rules that conflict. Paths with spaces
(C:\Program Files\...) broke, and metacharacters like parentheses
in JMESPath queries were interpreted as cmd.exe grouping operators.
Fixed by using the Arguments string property with proper quoting
for the cmd.exe /c case.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 31b9bef commit a6abcdb
1 file changed
Lines changed: 21 additions & 4 deletions
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
270 | | - | |
| 269 | + | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
276 | | - | |
277 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
278 | 294 | | |
279 | 295 | | |
280 | 296 | | |
| |||
305 | 321 | | |
306 | 322 | | |
307 | 323 | | |
| 324 | + | |
308 | 325 | | |
309 | 326 | | |
310 | 327 | | |
| |||
0 commit comments