Skip to content

Commit ad15f95

Browse files
committed
feat: support config.yml or config.yaml
Closes #173
1 parent a9781e1 commit ad15f95

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/daemon/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,11 @@ func loadConfig(cfg *Config) error {
495495
}
496496

497497
func (cfg *Config) ConfigPath() string {
498-
return filepath.Join(cfg.ConfigDir, "config.yml")
498+
if _, err := os.Stat(filepath.Join(cfg.ConfigDir, "config.yaml")); os.IsNotExist(err) {
499+
return filepath.Join(cfg.ConfigDir, "config.yml")
500+
} else {
501+
return filepath.Join(cfg.ConfigDir, "config.yaml")
502+
}
499503
}
500504

501505
func (cfg *Config) StatePath() string {

0 commit comments

Comments
 (0)