Skip to content

Commit

Permalink
fix: nil pointer of run.watcher.{config,datasets}.Events
Browse files Browse the repository at this point in the history
Signed-off-by: Dwi Siswanto <[email protected]>
  • Loading branch information
dwisiswant0 committed Oct 2, 2023
1 parent 2e66d08 commit 1d8d980
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ func New(opt *common.Options) error {

defer w.Close()
run.watcher.config = w
} else {
run.watcher.config = new(fsnotify.Watcher)
}

dest := buildDest(opt.Destination)
Expand Down Expand Up @@ -94,6 +96,8 @@ func New(opt *common.Options) error {
if err := run.cron(); err != nil {
opt.Logger.Fatal(errSomething, "err", err)
}
} else {
run.watcher.datasets = new(fsnotify.Watcher)
}

go func() {
Expand Down

0 comments on commit 1d8d980

Please sign in to comment.