fix(postprocessing): fix --restart flag for resume command

The `--restart` / `-r` flag checked `c.Bool("retrigger")` instead of
`c.Bool("restart")`, so it silently did nothing. Fix the flag name and
add a simple confirmation message on success.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Paul Faure
2026-02-09 18:31:52 -05:00
parent 9b6a08fdf9
commit 1e8d411896
2 changed files with 16 additions and 2 deletions

View File

@@ -0,0 +1,8 @@
Bugfix: Fix postprocessing resume command --restart flag
The `--restart` / `-r` flag for `ocis postprocessing resume` was broken due to a flag
name mismatch (`retrigger` vs `restart`) and silently did nothing. This has been fixed
and the command now prints a confirmation message on success.
https://github.com/owncloud/ocis/issues/11692
https://github.com/owncloud/ocis/pull/12002

View File

@@ -2,6 +2,7 @@ package command
import (
"context"
"fmt"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/generators"
@@ -54,7 +55,7 @@ func RestartPostprocessing(cfg *config.Config) *cli.Command {
var ev events.Unmarshaller
switch {
case c.Bool("retrigger"):
case c.Bool("restart"):
ev = events.RestartPostprocessing{
UploadID: uid,
Timestamp: utils.TSNow(),
@@ -67,7 +68,12 @@ func RestartPostprocessing(cfg *config.Config) *cli.Command {
}
}
return events.Publish(context.Background(), stream, ev)
if err := events.Publish(context.Background(), stream, ev); err != nil {
return err
}
fmt.Println("Postprocessing event published successfully")
return nil
},
}
}