-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
error output of "minikube docker-env" should go to stderr #10761
Comments
It happened when minikube got "smart", and tries to diagnose and fix cluster issues. This broke "docker-env" and "kubectl" both.
$ minikube docker-env
🤷 Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉 To start a cluster, run: "minikube start"
$ minikube docker-env 2>/dev/null || echo $?
* Profile "minikube" not found. Run "minikube profile list" to view all profiles.
- To start a cluster, run: "minikube start"
85 Maybe it should be a bit more dumb, and simply fail ? Because this command is normally used non-interactively, like with "eval".
|
The same thing also applies to the "podman-env" command. |
I made the output quiet, when running under eval: $ ./out/minikube docker-env || echo $?
🤷 Profile "minikube" not found. Run "minikube profile list" to view all profiles.
👉 To start a cluster, run: "minikube start"
85
$ eval $(./out/minikube docker-env) || echo $?
1
$ ./out/minikube docker-env | cat
false exit code 85 $ ./out/minikube docker-env || echo $?
🤷 The control plane node must be running for this command
👉 To start a cluster, run: "minikube start"
89
$ eval $(./out/minikube docker-env) || echo $?
1
$ ./out/minikube docker-env | cat
false exit code 89 Possibly there should be a more descriptive error. |
Note that before it would not return any error, which means that user would continue to use local docker... A successful "docker-env" would set DOCKER_HOST, but a failing "docker-env" would just return empty. |
Steps to reproduce the issue:
(used minikube version: 1.18.1)
which itself is fine, but the problem is the target of the output. The output seems to go to stdout, which results in a strange error if you post process the output with
eval $(minikube docker-env)
. The leading*
of the error message leads to an error likebash: <first file of current folder>: command not found
referencing the first file of the current folder, which could be total unrelated to minikube.If the output would go to stderr instead of stdout the problem would not occur. If I remember correctly, some versions ago (without knowing the exact version) this was the case, but now the output also in this error case seems to go to stdout, which raise the problem.
Full output of
minikube start
command used, if not already included:As mentioned before
minikube
is not started.The text was updated successfully, but these errors were encountered: