Repository navigation
fix(cli): wait for a Windows opener's exit code on WSL, and keep unsafe paths from wslview - #75
Merged
Merged
Conversation
…owerShell would expand from wslview, and find PowerShell under any automount root
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
|
🎉 This PR is included in version 0.6.3-rc.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Merged
Contributor
|
🎉 This PR is included in version 0.6.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #73, from a review of the WSL opener chain.
xdg-openwas never tried.xdg-openkeeps the short wait because it can become the browser and never exit.wslview.wslviewhands the path to PowerShell with its own quoting, so a path with$, a backtick or a quote goes straight to the encoded-command opener, which escapes it. I could not reach thewslviewsource to confirm how it quotes, so this is a guard, not a fix for a reproduced bug.[automount] root=/), not only at/mnt/c.Not changed:
explorer.exeis not restored as a fallback (its exit code cannot say whether anything opened), andxdg-openstays last.Evidence
After:
waits as long as the opener asks before taking it as handed offpasses: withwait: 100it counts as handed off, withwait: 30000it reportsexited with 1.Run on macOS only. Nothing here was run on WSL.
Merge Danger
Door: two-way
One commit touching
packages/cli/src/open.tsand its test.Blast Radius: Narrow
Only
deliver --openon WSL. If a Windows opener hangs without exiting, the command now waits up to 15 seconds, where it waited 3, before treating the file as opened.