summaryrefslogtreecommitdiff
path: root/crocc.go
diff options
context:
space:
mode:
Diffstat (limited to 'crocc.go')
-rw-r--r--crocc.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/crocc.go b/crocc.go
index 4e6d48d..266b816 100644
--- a/crocc.go
+++ b/crocc.go
@@ -81,6 +81,10 @@ func main() {
// Check output directory
if _, err := os.Stat(*out); !os.IsNotExist(err) {
log.Fatalf("output directory %q already exists", *out)
+ } else {
+ if err := os.MkdirAll(*out, 0755); err != nil {
+ log.Fatalf("unable to create output directory %q: %v", *out, err)
+ }
}
// Retrieve template file