Commit 14200b9
committed
fix(cli): fix PowerShell install errors on Windows (#1284)
## Summary
- Add `Unblock-File` after downloading binaries to strip Zone.Identifier (Mark of the Web), preventing Windows SmartScreen/Defender "Access Denied" errors
- Replace `*> $installLog` with captured output + `Out-File` to fix PowerShell 7.6 `StandardOutputEncoding` error
- Add PowerShell 7.6 CI test job for regression coverage
## Details
Three related issues all stem from Windows security blocking downloaded executables:
1. **#901 — `vp.exe` blocked by Windows Security**: Defender flags the downloaded binary due to MOTW Zone.Identifier ADS. Users had to manually add exclusions.
2. **#1019 — `StandardOutputEncoding` error (PowerShell 7.6)**: The `*>` redirection operator on native commands causes a .NET `InvalidOperationException` when running interactively (real console attached). Also reported "Access Denied" when running `vp.exe`.
3. **#1226 — `Failed to download Node.js runtime: Access is denied. (os error 5)`**: `vp.exe` starts but its file operations (locking, renaming) are restricted by Defender due to MOTW, causing the Node.js runtime download to fail.
**Fix**: `Unblock-File` strips the MOTW from all `.exe` files in `$BinDir` immediately after extraction, before `vp.exe install --silent` runs.
Closes #901
Closes #1019
Closes #12261 parent 35ce525 commit 14200b9
File tree
2 files changed
+88
-2
lines changed- .github/workflows
- packages/cli
2 files changed
+88
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
477 | 557 | | |
478 | 558 | | |
479 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
353 | 357 | | |
354 | 358 | | |
355 | 359 | | |
| |||
376 | 380 | | |
377 | 381 | | |
378 | 382 | | |
379 | | - | |
380 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
381 | 387 | | |
382 | 388 | | |
383 | 389 | | |
| |||
0 commit comments