Example #1
0
// 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
}
Example #2
0
// 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
}