Skip to content

Fix WSL install script: use wsl -e /bin/bash to avoid /bin/sh PATH issues#9

Merged
aniongithub merged 1 commit into
mainfrom
aniongithub/fix-wsl-install-script
Apr 27, 2026
Merged

Fix WSL install script: use wsl -e /bin/bash to avoid /bin/sh PATH issues#9
aniongithub merged 1 commit into
mainfrom
aniongithub/fix-wsl-install-script

Conversation

@aniongithub
Copy link
Copy Markdown
Owner

wsl bash -c routes through /bin/sh, which may not have bash in its PATH on minimal WSL distros. This causes the install to fail with:

wsl : /bin/sh: bash: not found

Fix: use wsl -e /bin/bash to invoke bash directly, bypassing the default shell. Applied to all three WSL invocations in the script.

The default WSL distro may be docker-desktop, which is a minimal
environment without bash or curl. The install script now:

- Enumerates WSL distros and filters out docker-desktop
- Prompts the user to choose when multiple distros are available
- Passes -d <distro> to all wsl invocations
- Strips UTF-16 null bytes from wsl -l -q output
- Updates devcontainer CLI link to install script page
@aniongithub aniongithub force-pushed the aniongithub/fix-wsl-install-script branch from 8547523 to 537fbe8 Compare April 26, 2026 21:49
@aniongithub aniongithub marked this pull request as ready for review April 27, 2026 01:54
@aniongithub aniongithub merged commit f553355 into main Apr 27, 2026
1 check passed
@aniongithub aniongithub deleted the aniongithub/fix-wsl-install-script branch April 27, 2026 01: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.

1 participant