diff --git a/cmd/signaldctl/config/config.go b/cmd/signaldctl/config/config.go index 319f0a1..41de719 100644 --- a/cmd/signaldctl/config/config.go +++ b/cmd/signaldctl/config/config.go @@ -18,6 +18,7 @@ package config import ( "log" "os" + "path" "gopkg.in/yaml.v2" ) @@ -54,6 +55,9 @@ func Load() error { } func Save() error { + if err := os.MkdirAll(path.Dir(Path), 0660); err != nil { + return err + } f, err := os.Create(Path) if err != nil { return err