Skip to content

Commit

Permalink
Refactor error handling in main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
simulot committed Oct 13, 2024
1 parent c3acf1d commit 33c14bc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,9 @@ func runImmichGo(ctx context.Context) error {

// let's start
err := cmd.ExecuteContext(ctx)
if err != nil {
if app.Log() != nil {
app.Log().Error(err.Error())
}
if err != nil && app.Log().GetSLog() != nil {
app.Log().Error(err.Error())
}

return err
}

0 comments on commit 33c14bc

Please sign in to comment.