Skip to content

Commit

Permalink
Add fix warning for active podman-env as well
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed May 11, 2020
1 parent c578a7a commit 16af75e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions pkg/minikube/machine/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,24 @@ func maybeWarnAboutEvalEnv(drver string, name string) {
if !driver.IsKIC(drver) {
return
}
p := os.Getenv(constants.MinikubeActiveDockerdEnv)
if p == "" {
return
}
out.T(out.Notice, "Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:", out.V{"driver_name": drver})
// TODO: refactor docker-env package to generate only eval command per shell. https://github.com/kubernetes/minikube/issues/6887
out.WarningT(`Please re-eval your docker-env, To ensure your environment variables have updated ports:
if os.Getenv(constants.MinikubeActiveDockerdEnv) != "" {
out.T(out.Notice, "Noticed you have an activated docker-env on {{.driver_name}} driver in this terminal:", out.V{"driver_name": drver})
// TODO: refactor docker-env package to generate only eval command per shell. https://github.com/kubernetes/minikube/issues/6887
out.WarningT(`Please re-eval your docker-env, To ensure your environment variables have updated ports:
'minikube -p {{.profile_name}} docker-env'
`, out.V{"profile_name": name})
}
if os.Getenv(constants.MinikubeActivePodmanEnv) != "" {
out.T(out.Notice, "Noticed you have an activated podman-env on {{.driver_name}} driver in this terminal:", out.V{"driver_name": drver})
// TODO: refactor podman-env package to generate only eval command per shell. https://github.com/kubernetes/minikube/issues/6887
out.WarningT(`Please re-eval your podman-env, To ensure your environment variables have updated ports:
'minikube -p {{.profile_name}} podman-env'
`, out.V{"profile_name": name})
}

}

Expand Down

0 comments on commit 16af75e

Please sign in to comment.