`deploy` on Windows uses bash
Describe the bug I added a custom command to deploy a service. However instead of okteto using powershell (from which it was called and where I have all necessary commands) it tried using WSL where commands are missing.
To Reproduce add
deploy:
- name: test
command: whoami
to your okteto.yml. Notice that it outputs your username from WSL, not Windows.
Expected behavior
For okteto to not use WSL by default. There can either be a flag to tell it what shell to use or we can use bash as part of the command, but I think it should use the native environment by default.
Desktop
- OS: Windows
- Version 10
Workaround
It is possible to prepend the command with /mnt/c/Program\ Files/Powershell/7/pwsh.exe -c to invoke powershell from bash.
This is suboptimal since we have a team with developers using different OS's.
Could reproduce, I tried with ls / command as I have the same username in WSL and my windows machine.
The issue seems to be here, when you run bash from a windows machine with WSL, it redirects to the bash inside WSL. Maybe there's a way to let the go executor take care of this
@jmacelroy Are there any fixes for this issue?
@jmacelroy Are there any fixes for this issue?
@ZhaoTzuHsien For now there are 2 possible workarouds:
- Prepend the command with
/mnt/c/Program\ Files/Powershell/7/pwsh.exe -c - Use
oktetofrom inside WSL
The issue will be fixed in the future so these workarounds are not needed
@mladedav @ZhaoTzuHsien This issue is already fixed in master and will be included in the next cli 2.7.0 release 🚀