-
I would like to use windows-wsl-ubuntu-20_04:
name: WSL [Ubuntu 20.04]
runs-on: windows-2019
defaults:
run:
shell: wsl-bash {0} # https://github.com/marketplace/actions/setup-wsl#default-shell
working-directory: /c/Users/runneradmin
steps:
- uses: Vampire/setup-wsl@v1
with:
distribution: Ubuntu-20.04
- name: Dependencies
run: |
pwd # DEBUG
sudo apt update && sudo DEBIAN_FRONTEND=noninteractive apt install -y gcc git curl mesa-utils but as soon as my run gets to "Dependencies" it gives
because But if I use Windows-style paths:
it runs, but then If I simply do
on the other hand, then
Any ideas on if there a way to tell |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
But you can also easily use the |
Beta Was this translation helpful? Give feedback.
wsl-bash
does respectworking-directory
.C:\Users\runneradmin
is just not the home directory within WSL.To use
working-directory
for your use-case you would have to find out which Windows path corresponds to the WSL path where you want to be and use that.But you can also easily use the
wsl-shell-command
input for your use-case.Just set it to
bash -c "cd && bash --noprofile --norc -euo pipefail "\
(the final slash is not a typo) orbash -c "cd && bash --noprofile --norc -euo pipefail '{0}'"
and yourwsl-bash
will always start in the WSL home directory.I added the latter variant to the examples for the
wsl-shell-command
input.