Skip to content

Commit a15f878

Browse files
committed
fix: linter remarks
1 parent f0018a4 commit a15f878

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

app/cmd/upload/noui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (upCmd *UpCmd) runNoUI(ctx context.Context, app *app.Application) error {
118118
if messages.Len() > 0 {
119119
cancel(errors.New(messages.String()))
120120
}
121-
upCmd.finishing(ctx, app)
121+
err = errors.Join(err, upCmd.finishing(ctx, app))
122122
close(stopProgress)
123123
return err
124124
})

app/cmd/upload/run.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ func (UpCmd *UpCmd) pauseJobs(ctx context.Context, app *app.Application) error {
126126
return nil
127127
}
128128

129-
func (UpCmd *UpCmd) resumeJobs(ctx context.Context, app *app.Application) error {
129+
func (UpCmd *UpCmd) resumeJobs(_ context.Context, app *app.Application) error {
130130
if UpCmd.shouldResumeJobs == nil {
131131
return nil
132132
}
133133
// Start with a context not yet cancelled
134-
ctx = context.Background() //nolint
134+
ctx := context.Background() //nolint
135135
for name, shouldResume := range UpCmd.shouldResumeJobs {
136136
if shouldResume {
137-
_, err := app.Client().AdminImmich.SendJobCommand(ctx, name, "resume", true)
137+
_, err := app.Client().AdminImmich.SendJobCommand(ctx, name, "resume", true) //nolint:contextcheck
138138
if err != nil {
139139
UpCmd.app.Jnl().Log().Error("Immich Job command sent", "resume", name, "err", err.Error())
140140
return err
@@ -184,7 +184,7 @@ func (upCmd *UpCmd) run(ctx context.Context, adapter adapters.Reader, app *app.A
184184
return err
185185
}
186186
}
187-
defer upCmd.finishing(ctx, app)
187+
defer func() { _ = upCmd.finishing(ctx, app) }()
188188
defer func() {
189189
fmt.Println(app.Jnl().Report())
190190
}()

app/cmd/upload/ui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func (upCmd *UpCmd) runUI(ctx context.Context, app *app.Application) error {
201201
// return context.Cause(ctx)
202202
// }
203203

204-
upCmd.finishing(ctx, app)
204+
err = errors.Join(err, upCmd.finishing(ctx, app))
205205

206206
uploadDone.Store(true)
207207
counts := app.Jnl().GetCounts()

0 commit comments

Comments
 (0)