mirror of
https://codeberg.org/scip/esctl.git
synced 2026-08-24 10:04:18 +02:00
load -c <file> if exists
This commit is contained in:
@@ -121,10 +121,11 @@ func getDefaultPath() string {
|
||||
func (conf *Config) Init() error {
|
||||
DefaultConfig := getDefaultPath()
|
||||
|
||||
switch {
|
||||
case fileExists(DefaultConfig):
|
||||
if conf.ConfigFile == "" && fileExists(DefaultConfig) {
|
||||
conf.ConfigFile = DefaultConfig
|
||||
fallthrough
|
||||
}
|
||||
|
||||
switch {
|
||||
case conf.ConfigFile != "":
|
||||
if err := conf.LoadConfig(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user