Inconsistent behavior listing profiles in json when none exist #5898
Labels
area/profiles
issues related to profile handling
good first issue
Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.
help wanted
Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
kind/bug
Categorizes issue or PR as related to a bug.
priority/backlog
Higher priority than priority/awaiting-more-evidence.
Using minikube version 1.5.2 tested on Linux and Windows 10 with the same behavior:
The command
minikube profile list -o json
provides inconsistent behavior whether or not the$MINIKUBE_HOME/profiles
folder exists or not.When
$MINIKUBE_HOME/profiles
does not exist, the command outputs:{"error":{"Op":"open","Path":"/root/.minikube/profiles","Err":2}}
and minikube exits with status 1When that folder does exist, the command outputs:
{"invalid":[],"valid":[]}
with exit status 0 (as expected).This seems like undesirable behavior, especially because
minikube profile list
(without json output) is consistent in both scenarios, outputting the generic* No minikube profile was found. You can create one using `minikube start`.
error message and exiting with status code 64 regardless of whether the$MINIKUBE_HOME/profiles
folder exists or notExample of full replication output in bash:
Minikube should probably ensure that the
$MINIKUBE_HOME/profiles
folder exists (and create it if missing) before the profile list operation in order to provide consistent, expected behavior.The text was updated successfully, but these errors were encountered: