|
|
@ -17,7 +17,7 @@ import (
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const VERSION = "1.5.7"
|
|
|
|
const VERSION = "1.5.8"
|
|
|
|
|
|
|
|
|
|
|
|
type OptionMap map[string][]interface{}
|
|
|
|
type OptionMap map[string][]interface{}
|
|
|
|
type Options map[string]OptionMap
|
|
|
|
type Options map[string]OptionMap
|
|
|
@ -60,11 +60,16 @@ func GetConfig() *Config {
|
|
|
|
colors.Faint.Println("Using env:\t", envFile)
|
|
|
|
colors.Faint.Println("Using env:\t", envFile)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
cfgFileName := ".autorestic"
|
|
|
|
text := err.Error()
|
|
|
|
colors.Error.Println(
|
|
|
|
if strings.Contains(text, "no such file or directory") {
|
|
|
|
fmt.Sprintf(
|
|
|
|
cfgFileName := ".autorestic"
|
|
|
|
"cannot find configuration file '%s.yml' or '%s.yaml'.",
|
|
|
|
colors.Error.Println(
|
|
|
|
cfgFileName, cfgFileName))
|
|
|
|
fmt.Sprintf(
|
|
|
|
|
|
|
|
"cannot find configuration file '%s.yml' or '%s.yaml'.",
|
|
|
|
|
|
|
|
cfgFileName, cfgFileName))
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
colors.Error.Println("could not load config file\n" + text)
|
|
|
|
|
|
|
|
}
|
|
|
|
os.Exit(1)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|