Skip to content

Commit

Permalink
Fix collecting scripts for custom SCRIPTS_DIR (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniil Anichyn <[email protected]>
  • Loading branch information
DaniilAnichin and Daniil Anichyn authored Sep 28, 2020
1 parent 9f909a8 commit 2b1bc6e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gort.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func init() {
scriptsDir = os.Getenv("SCRIPTS_DIR")
if scriptsDir == "" {
scriptsDir = defaultScriptsDir
if _, err := os.Stat(scriptsDir); os.IsNotExist(err) {
log.Panic(err)
}
scripts = utils.ScanScripts(scriptsDir)
}
if _, err := os.Stat(scriptsDir); os.IsNotExist(err) {
log.Panic(err)
}
scripts = utils.ScanScripts(scriptsDir)
}

func main() {
Expand Down

0 comments on commit 2b1bc6e

Please sign in to comment.