Skip to content

Commit 7a4c6d6

Browse files
committed
create config directory if it doesn't exist (badgerodon#1)
1 parent 62d96f3 commit 7a4c6d6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

shell.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ func (sh *shell) Save(env *Environment) error {
102102
err := func() error {
103103
fi, err := os.Stat(inName)
104104
if err != nil {
105+
os.MkdirAll(filepath.Dir(inName), 0755)
105106
ioutil.WriteFile(inName, []byte{}, 0755)
106107
fi, err = os.Stat(inName)
107108
}

0 commit comments

Comments
 (0)