Open robrich opened 4 years ago
Complete guess:
func init() {
powershell, _ = exec.LookPath("powershell")
}
to
func init() {
powershell, _ = exec.LookPath("powershell") || exec.LookPath("pwsh")
}
Inherited from https://github.com/docker/machine/issues/4789 and https://github.com/docker/machine/issues/4826
I think you mean ||
rather than &&
? (it is pseudo-code, but)
At the moment, we defer to github.com/docker/machine/libmachine/shell
for it's shell detection. I wonder if there is a better library for us to use.
It looks like https://github.com/docker/machine/issues/4826 identifies this issue there, and https://github.com/docker/machine/pull/4827 is set to fix it ... but currently yields a broken build.
@afbjorklund you are completely correct. Comment updated. And I see the rest of my comment is redundant to your post too. :D
We have already forked the code, so will have to fix it (as you outlined, just look for the new name and blame the lack of backwards compatibility on Windows)
@afbjorklund do we have a plan to pull that code ?
I didn't see any PR, but it should be straightforward to fix ? Apparently there is another place, in "hyperv.go":
pkg/minikube/registry/drvs/hyperv/hyperv.go: path, err := exec.LookPath("powershell")
pkg/minikube/registry/drvs/hyperv/powershell.go: powershell, _ = exec.LookPath("powershell")
I've closed my issue & PR in favor of docker/machine#4788 who solved it first with the exact same fix, and lucked out to not have a broken build.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale
Unstale please. In theory this is a 2-line fix. I definitely don't have enough perspective to criticize, but a few months of inactivity seems a mistake. What's the fastest path to resolution?
/remove-lifecycle stale
let's fix this
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale
Unstale please.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten
Unstale please
Steps to reproduce the issue:
pwsh.exe
)minikube start ...
minikube docker-env
Full output of failed command:
Expected output
Note how passing in
--shell powershell
yielded the correct results, but using the default auto-detect did not detect powershell.Note: running on regular powershell works just fine. This issue only affects powershell core.