mirror of https://github.com/knative/client.git
Pickup config path from env (#27)
This commit is contained in:
parent
b5b02f64f3
commit
be50567b38
|
|
@ -82,7 +82,12 @@ func InitializeConfig() {
|
|||
}
|
||||
|
||||
func initKubeConfig() {
|
||||
if kubeCfgFile == "" {
|
||||
if kubeCfgFile != "" {
|
||||
return
|
||||
}
|
||||
if kubeEnvConf, ok := os.LookupEnv("KUBECONFIG"); ok {
|
||||
kubeCfgFile = kubeEnvConf
|
||||
} else {
|
||||
home, err := homedir.Dir()
|
||||
if err != nil {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue