We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 847c545 commit b017c64Copy full SHA for b017c64
where/where.go
@@ -1,21 +1,25 @@
1
package where
2
3
import (
4
+ "log"
5
+ "os"
6
+ "path/filepath"
7
+
8
"github.com/metafates/mangal/constant"
9
"github.com/metafates/mangal/filesystem"
10
"github.com/metafates/mangal/key"
11
"github.com/samber/lo"
12
"github.com/spf13/viper"
- "os"
- "path/filepath"
13
)
14
15
const EnvConfigPath = "MANGAL_CONFIG_PATH"
16
17
// mkdir creates a directory and all parent directories if they don't exist
18
// will return the path of the directory
19
func mkdir(path string) string {
- lo.Must0(filesystem.Api().MkdirAll(path, os.ModePerm))
20
+ if filesystem.Api().MkdirAll(path, os.ModePerm) != nil {
21
+ log.Fatalf("Error: could not create directory %s", path)
22
+ }
23
return path
24
}
25
0 commit comments