fix(cli): fix PowerShell install errors on Windows#1284
fix(cli): fix PowerShell install errors on Windows#1284graphite-app[bot] merged 1 commit intomainfrom
Conversation
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
d5e5742 to
daa2068
Compare
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
daa2068 to
1473dac
Compare
|
it works #1019 (comment) |
1473dac to
0bcee16
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
60a8347 to
2945714
Compare
Merge activity
|
## 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 #1226
2945714 to
14200b9
Compare

Summary
Unblock-Fileafter downloading binaries to strip Zone.Identifier (Mark of the Web), preventing Windows SmartScreen/Defender "Access Denied" errors*> $installLogwith captured output +Out-Fileto fix PowerShell 7.6StandardOutputEncodingerrorDetails
Three related issues all stem from Windows security blocking downloaded executables:
vp.exe is blocked by windows security #901 —
vp.exeblocked by Windows Security: Defender flags the downloaded binary due to MOTW Zone.Identifier ADS. Users had to manually add exclusions.vp installation fails on windows 11 25h2, pwsh 7.5.5 #1019 —
StandardOutputEncodingerror (PowerShell 7.6): The*>redirection operator on native commands causes a .NETInvalidOperationExceptionwhen running interactively (real console attached). Also reported "Access Denied" when runningvp.exe.Error: Failed to install dependencies on install #1226 —
Failed to download Node.js runtime: Access is denied. (os error 5):vp.exestarts but its file operations (locking, renaming) are restricted by Defender due to MOTW, causing the Node.js runtime download to fail.Fix:
Unblock-Filestrips the MOTW from all.exefiles in$BinDirimmediately after extraction, beforevp.exe install --silentruns.Closes #901
Closes #1019
Closes #1226