Skip to content

fix(cli): fix PowerShell install errors on Windows#1284

Merged
graphite-app[bot] merged 1 commit intomainfrom
fix-pwsh-install-error-1019
Apr 6, 2026
Merged

fix(cli): fix PowerShell install errors on Windows#1284
graphite-app[bot] merged 1 commit intomainfrom
fix-pwsh-install-error-1019

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Apr 3, 2026

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. vp.exe is blocked by windows security #901vp.exe blocked by Windows Security: Defender flags the downloaded binary due to MOTW Zone.Identifier ADS. Users had to manually add exclusions.

  2. vp installation fails on windows 11 25h2, pwsh 7.5.5 #1019StandardOutputEncoding 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. Error: Failed to install dependencies on install #1226Failed 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

@fengmk2 fengmk2 self-assigned this Apr 3, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 3, 2026


How to use the Graphite Merge Queue

Add 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.

Base automatically changed from fix-npm-LICENSE to main April 3, 2026 05:59
@fengmk2 fengmk2 force-pushed the fix-pwsh-install-error-1019 branch from d5e5742 to daa2068 Compare April 3, 2026 06:02
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 3, 2026

Deploy Preview for viteplus-preview ready!

Name Link
🔨 Latest commit 14200b9
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69d37301a24dfe0008465ec8
😎 Deploy Preview https://deploy-preview-1284--viteplus-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fengmk2 fengmk2 force-pushed the fix-pwsh-install-error-1019 branch from daa2068 to 1473dac Compare April 3, 2026 06:16
@fengmk2 fengmk2 changed the title ci: add PowerShell 7.6 test job to reproduce install error fix(cli): replace *> with 2>&1 | Out-File in install.ps1 Apr 3, 2026
@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 3, 2026

it works #1019 (comment)

@fengmk2 fengmk2 marked this pull request as ready for review April 3, 2026 06:44
@fengmk2 fengmk2 requested review from branchseer, cpojer and kazupon April 3, 2026 06:44
@fengmk2 fengmk2 force-pushed the fix-pwsh-install-error-1019 branch from 1473dac to 0bcee16 Compare April 3, 2026 06:53
@fengmk2 fengmk2 changed the title fix(cli): replace *> with 2>&1 | Out-File in install.ps1 fix(cli): fix PowerShell install errors on Windows Apr 3, 2026
@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Apr 3, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@fengmk2 fengmk2 mentioned this pull request Apr 3, 2026
4 tasks
@fengmk2 fengmk2 force-pushed the fix-pwsh-install-error-1019 branch 2 times, most recently from 60a8347 to 2945714 Compare April 6, 2026 08:27
@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Apr 6, 2026

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
@graphite-app graphite-app bot force-pushed the fix-pwsh-install-error-1019 branch from 2945714 to 14200b9 Compare April 6, 2026 08:46
@graphite-app graphite-app bot merged commit 14200b9 into main Apr 6, 2026
46 checks passed
@graphite-app graphite-app bot deleted the fix-pwsh-install-error-1019 branch April 6, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Failed to install dependencies on install vp installation fails on windows 11 25h2, pwsh 7.5.5 vp.exe is blocked by windows security

4 participants