예제 #1
0
파일: action.go 프로젝트: 2opremio/helm
// mustConfig parses a config file or dies trying.
func mustConfig(homedir string) *config.Configfile {
	rpath := filepath.Join(homedir, helm.Configfile)
	cfg, err := config.Load(rpath)
	if err != nil {
		log.Warn("Oops! Looks like we had some issues running your command! Running `helm doctor` to ensure we have all the necessary prerequisites in place...")
		Doctor(homedir)
		cfg, err = config.Load(rpath)
		if err != nil {
			log.Die("Oops! Could not load %s. Error: %s", rpath, err)
		}
		log.Info("Continuing onwards and upwards!")
	}
	return cfg
}
예제 #2
0
파일: action.go 프로젝트: michelleN/helm
// mustConfig parses a config file or dies trying.
func mustConfig(homedir string) *config.Configfile {
	rpath := filepath.Join(homedir, helm.Configfile)
	cfg, err := config.Load(rpath)
	if err != nil {
		log.Die("Could not load %s: %s", rpath, err)
	}
	return cfg
}