Skip to content
This repository was archived by the owner on Jan 20, 2021. It is now read-only.

Commit 3bfa566

Browse files
committed
create directory if outputDir does not exists
1 parent effd2a6 commit 3bfa566

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.go

+5
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ func main() {
7575
outputDir = pwd
7676
}
7777

78+
// create directory if outputDir does not exists
79+
if _, err := os.Stat(outputDir); os.IsNotExist(err) {
80+
os.MkdirAll(outputDir, 0755)
81+
}
82+
7883
rooms := c.Args()
7984
api := slack.New(token)
8085
_, err := api.AuthTest()

0 commit comments

Comments
 (0)