Skip to content

Commit

Permalink
Merge pull request #165 from ruudk/file-wait
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilder authored Dec 18, 2021
2 parents ac28527 + c1c97dc commit 37caf42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ func waitForDependencies() {
ticker := time.NewTicker(waitRetryInterval)
defer ticker.Stop()
var err error
if _, err = os.Stat(u.Path); err == nil {
log.Printf("File %s had been generated\n", u.String())
return
}
for range ticker.C {
if _, err = os.Stat(u.Path); err == nil {
log.Printf("File %s had been generated\n", u.String())
Expand Down

0 comments on commit 37caf42

Please sign in to comment.