Skip to content

working-directory: #13

Answered by Vampire
kousu asked this question in Q&A
Discussion options

You must be logged in to vote

wsl-bash does respect working-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) or bash -c "cd && bash --noprofile --norc -euo pipefail '{0}'" and your wsl-bash will always start in the WSL home directory.
I added the latter variant to the examples for the wsl-shell-command input.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Vampire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #12 on November 15, 2021 00:10.