We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c76523 commit 25bf3bfCopy full SHA for 25bf3bf
boilr.go
@@ -1,7 +1,22 @@
1
package main
2
3
-import "github.com/tmrts/boilr/pkg/cmd"
+import (
4
+ "fmt"
5
+ "github.com/tmrts/boilr/pkg/boilr"
6
+ "github.com/tmrts/boilr/pkg/cmd"
7
+ "github.com/tmrts/boilr/pkg/util/exit"
8
+ "github.com/tmrts/boilr/pkg/util/osutil"
9
+)
10
11
func main() {
- cmd.Run()
12
+ if exists, err := osutil.DirExists(boilr.Configuration.TemplateDirPath); ! exists {
13
+ if err := osutil.CreateDirs(boilr.Configuration.TemplateDirPath); err != nil {
14
+ exit.Error(fmt.Errorf("Tried to initialise your template directory, but it has failed: %s", err))
15
+ }
16
+ } else if err != nil {
17
+ exit.Error(fmt.Errorf("Failed to init: %s", err))
18
19
+
20
+ cmd.Run()
21
}
22
0 commit comments