Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36
fix: preserve PATHEXT for Windows cached tasks#366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # This fixture intentionally tracks package-shim files under node_modules/.bin. | ||
| !node_modules | ||
| !node_modules/** |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "name": "windows-powershell-shim-pathext" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [[e2e]] | ||
| name = "powershell_package_shim_keeps_pathext" | ||
| platform = "windows" | ||
| comment = """ | ||
| Cached Windows tasks run with a sanitized environment, and pnpm-style package | ||
| `.cmd` shims in `node_modules/.bin` are rewritten at plan time to invoke their | ||
| `.ps1` sibling via `powershell.exe -File`. PowerShell needs `PATHEXT` in that | ||
| environment to launch native executables — even when the executable name is | ||
| written out with a `.exe` extension — so `PATHEXT` must be preserved in the | ||
| default untracked env passthrough. | ||
| """ | ||
| steps = [ | ||
| { argv = [ | ||
| "vt", | ||
| "run", | ||
| "probe", | ||
| ], comment = "rewritten to `powershell.exe -File probe-cli.ps1`; the shim launches `vtt.exe write-file` to write `marker.txt`" }, | ||
| { argv = [ | ||
| "vtt", | ||
| "print-file", | ||
| "marker.txt", | ||
| ], comment = "marker is present only if the shim's `vtt.exe` launch succeeded" }, | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # powershell_package_shim_keeps_pathext | ||
| Cached Windows tasks run with a sanitized environment, and pnpm-style package | ||
| `.cmd` shims in `node_modules/.bin` are rewritten at plan time to invoke their | ||
| `.ps1` sibling via `powershell.exe -File`. PowerShell needs `PATHEXT` in that | ||
| environment to launch native executables — even when the executable name is | ||
| written out with a `.exe` extension — so `PATHEXT` must be preserved in the | ||
| default untracked env passthrough. | ||
| ## `vt run probe` | ||
| rewritten to `powershell.exe -File probe-cli.ps1`; the shim launches `vtt.exe write-file` to write `marker.txt` | ||
| ``` | ||
| $ probe-cli | ||
| shim-ran | ||
| ``` | ||
| ## `vtt print-file marker.txt` | ||
| marker is present only if the shim's `vtt.exe` launch succeeded | ||
| ``` | ||
| shim-ran | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "cache": true, | ||
| "tasks": { | ||
| "probe": { | ||
| "command": "probe-cli", | ||
| "cache": true, | ||
| "input": [] | ||
| } | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.