Skip to content

Instantly share code, notes, and snippets.

@DanEdens
Created November 1, 2020 15:01
Show Gist options
  • Save DanEdens/8311bf74920a3ee2820e720838d9f368 to your computer and use it in GitHub Desktop.
Save DanEdens/8311bf74920a3ee2820e720838d9f368 to your computer and use it in GitHub Desktop.
fix_wsl2_interop
fix_wsl2_interop() {
for i in $(pstree -np -s $$ | grep -o -E '[0-9]+'); do
if [[ -e "/run/WSL/${i}_interop" ]]; then
export WSL_INTEROP=/run/WSL/${i}_interop
fi
done
}
alias socketfix='fix_wsl2_interop'
export -f fix_wsl2_interop
fix_wsl2_interop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment