Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minikube docker-env incorrectly recognizes shell type in PowerShell 7.1.5 #12860

Closed
WojciechThomas opened this issue Nov 4, 2021 · 0 comments · Fixed by #12870
Closed

minikube docker-env incorrectly recognizes shell type in PowerShell 7.1.5 #12860

WojciechThomas opened this issue Nov 4, 2021 · 0 comments · Fixed by #12870
Assignees
Labels
co/docker-env docker-env issues kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@WojciechThomas
Copy link

Steps to reproduce the issue:

  1. Open PowerShell 7.1.5

  2. Run minikube docker-env

  3. Minikube displays:

    SET DOCKER_TLS_VERIFY=1
    SET DOCKER_HOST=tcp://192.168.98.100:2376
    SET DOCKER_CERT_PATH=C:\Users\Wojtek\.minikube\certs
    SET MINIKUBE_ACTIVE_DOCKERD=minikube
    REM To point your shell to minikube's docker-daemon, run:
    REM @FOR /f "tokens=*" %i IN ('minikube -p minikube docker-env') DO @%i
    

    as if it was run in CMD instead of Powershell.

If the minikube docker-env is started in Windows 10 built-in PowerShell it works correctly.

If I execute & minikube -p minikube docker-env | Invoke-Expression command in PowerShell 7.1.5 it returns error:

You: The term 'You' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Invoke-Expression: Cannot bind argument to parameter 'Command' because it is an empty string.
Invoke-Expression:
Line |
   1 |  & minikube -p minikube docker-env | Invoke-Expression
     |                                      ~~~~~~~~~~~~~~~~~
     | The string is missing the terminator: '.

The same command in built-in Powershell works without flaws.

Temporary workaround is pointing to the correct version of shell: & minikube -p minikube docker-env --shell powershell | Invoke-Expression

@spowelljr spowelljr added kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Nov 5, 2021
@spowelljr spowelljr self-assigned this Nov 5, 2021
@spowelljr spowelljr added this to the 1.25.0-candidate milestone Nov 5, 2021
@spowelljr spowelljr added the co/docker-env docker-env issues label Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-env docker-env issues kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants