Skip to content

Commit 4567050

Browse files
Merge pull request #14 from senorprogrammer/TIL-12-log-dir-creation
Log config dir and file creation
2 parents 0bbec27 + 468acc9 commit 4567050

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

til.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ func makeConfigDir() {
187187
if err != nil {
188188
Fail(errors.New(errConfigDirCreate))
189189
}
190+
191+
Progress(fmt.Sprintf("created %s", cDir))
190192
}
191193
}
192194

@@ -205,6 +207,7 @@ func makeConfigFile() {
205207
// That was not fine
206208
Fail(errors.New(errConfigFileCreate))
207209
}
210+
208211
} else {
209212
// But wait, it's some kind of other error. What kind?
210213
// I dunno, but it's probably bad so die
@@ -224,6 +227,8 @@ func makeConfigFile() {
224227
if ioutil.WriteFile(cPath, []byte(defaultConfig), 0600) != nil {
225228
Fail(errors.New(errConfigFileWrite))
226229
}
230+
231+
Progress(fmt.Sprintf("created %s", cPath))
227232
}
228233
}
229234

0 commit comments

Comments
 (0)