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

eval (minikube -p minikube docker-env) doesn't work in fish-shell #6595

Closed
agusti-t opened this issue Feb 12, 2020 · 4 comments
Closed

eval (minikube -p minikube docker-env) doesn't work in fish-shell #6595

agusti-t opened this issue Feb 12, 2020 · 4 comments
Labels
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.

Comments

@agusti-t
Copy link

agusti-t commented Feb 12, 2020

The command doesn't do what it's expected in fish-shell, may be related to: #6540

minikube version                                                                                                    Wed Feb 12 15:42:40 2020
minikube version: v1.7.2
commit: 50d543b5fcb0e1c0d7c27b1398a9a9790df09dfb

The exact command to reproduce the issue: eval (minikube -p minikube docker-env)

The full output of the command that failed:

 ~  minikube -p minikube docker-env                                                                                                                                              Wed Feb 12 16:30:00 2020
set -gx DOCKER_TLS_VERIFY "1"
set -gx DOCKER_HOST "tcp://192.168.64.33:2376"
set -gx DOCKER_CERT_PATH "/Users/agusti/.minikube/certs"
set -gx MINIKUBE_ACTIVE_DOCKERD "minikube"

# To point your shell to minikube's docker-daemon, run:
# eval (minikube -p minikube docker-env)
 ~  env | grep DOCKER                                                                                                                                                    328ms  Wed Feb 12 16:30:01 2020
 !  ~  eval (minikube -p minikube docker-env)                                                                                                                                   Wed Feb 12 16:30:15 2020
 ~  env | grep DOCKER                                                                                                                                                    192ms  Wed Feb 12 16:30:16 2020
DOCKER_TLS_VERIFY=1 set -gx DOCKER_HOST tcp://192.168.64.33:2376 set -gx DOCKER_CERT_PATH /Users/agusti/.minikube/certs set -gx MINIKUBE_ACTIVE_DOCKERD minikube

Quick workaround is to just copy and paste the set commands and run them manually:

set -gx DOCKER_TLS_VERIFY "1"
set -gx DOCKER_HOST "tcp://192.168.64.33:2376"
set -gx DOCKER_CERT_PATH "/Users/agusti/.minikube/certs"
set -gx MINIKUBE_ACTIVE_DOCKERD "minikube"

Something like:

 !  ~  set -e DOCKER_TLS_VERIFY                                                                                                                                                 Wed Feb 12 16:33:19 2020
 ~  env | grep DOCKER                                                                                                                                                            Wed Feb 12 16:33:36 2020
 !  ~  set -gx DOCKER_TLS_VERIFY "1"                                                                                                                                            Wed Feb 12 16:33:46 2020
         set -gx DOCKER_HOST "tcp://192.168.64.33:2376"
         set -gx DOCKER_CERT_PATH "/Users/agusti/.minikube/certs"
         set -gx MINIKUBE_ACTIVE_DOCKERD "minikube"
 !  ~  env | grep DOCKER                                                                                                                                                        Wed Feb 12 16:33:46 2020
DOCKER_CERT_PATH=/Users/agusti/.minikube/certs
DOCKER_HOST=tcp://192.168.64.33:2376
DOCKER_TLS_VERIFY=1
MINIKUBE_ACTIVE_DOCKERD=minikube

The operating system version: macOS 10.14.5

@afbjorklund
Copy link
Collaborator

Looks like both code and test was changed (semicolon removed), so looked intentional... @tstromberg ?

@afbjorklund
Copy link
Collaborator

Still broken, with v1.7.3

anders@anders-ThinkPad:~$ fish
Välkommen till fish, det vänliga interaktiva skalet
Skriv help för instruktioner om hur man använder fish
anders@anders-ThinkPad ~> minikube docker-env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/home/anders/.minikube/certs"
export MINIKUBE_ACTIVE_DOCKERD="minikube"

# To point your shell to minikube's docker-daemon, run:
# eval $(minikube -p minikube docker-env)
anders@anders-ThinkPad ~> eval $(minikube -p minikube docker-env)
$(...) is not supported. In fish, please use '(minikube)'.
fish: eval $(minikube -p minikube docker-env)
           ^
anders@anders-ThinkPad ~> fish --version
fish, version 2.2.0
anders@anders-ThinkPad ~> minikube version
minikube version: v1.7.3
commit: 436667c819c324e35d7e839f8116b968a2d0a3ff

Apparently it doesn't set SHELL, so that is why the detection fails.

But if you try, then it actually gets worse (and definitely fails...)

anders@anders-ThinkPad ~> which fish
/usr/bin/fish
anders@anders-ThinkPad ~> export SHELL=/usr/bin/fish
anders@anders-ThinkPad ~> minikube docker-env
set -gx DOCKER_TLS_VERIFY "1"
set -gx DOCKER_HOST "tcp://192.168.99.100:2376"
set -gx DOCKER_CERT_PATH "/home/anders/.minikube/certs"
set -gx MINIKUBE_ACTIVE_DOCKERD "minikube"

# To point your shell to minikube's docker-daemon, run:
# eval (minikube -p minikube docker-env)
anders@anders-ThinkPad ~> eval (minikube -p minikube docker-env)
anders@anders-ThinkPad ~> env | grep DOCKER
DOCKER_TLS_VERIFY=1�set�-gx�DOCKER_HOST�tcp://192.168.99.100:2376�set�-gx�DOCKER_CERT_PATH�/home/anders/.minikube/certs�set�-gx�MINIKUBE_ACTIVE_DOCKERD�minikube

Was this what you were seeing too, @kppullin ?

@afbjorklund afbjorklund 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 Feb 22, 2020
@kppullin
Copy link
Contributor

@afbjorklund my output is similar, but without the chars and instead plain space characters (more like @agusti-t's output).

My login shell is set to fish, in which case the SHELL var is properly initialized to /usr/bin/fish and the detection works in that case. If I change the login shell to bash then I see the same behavior as your initial sample.

@afbjorklund
Copy link
Collaborator

Fixed in v1.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

No branches or pull requests

3 participants