From 7b9f316c708f07c3f1c9861094900913416bb0ae Mon Sep 17 00:00:00 2001 From: Nate Sales Date: Sat, 19 Jun 2021 13:24:54 -0700 Subject: [PATCH] create cache directory (#49) --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index e1388aaf..ca7e8446 100644 --- a/main.go +++ b/main.go @@ -157,6 +157,12 @@ func run(args []string) { } log.Debugln("Finished loading templates") + // Create cache directory + log.Debugf("Making cache directory %s", cliFlags.CacheDirectory) + if err := os.MkdirAll(cliFlags.CacheDirectory, os.FileMode(0755)); err != nil { + log.Fatal(err) + } + // Create the global output file log.Debug("Creating global config") globalFile, err := os.Create(path.Join(cliFlags.CacheDirectory, "bird.conf"))