Skip to content

Commit 6dd824f

Browse files
committed
fix restic forget global opts
1 parent e7e7a41 commit 6dd824f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/restic/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func (c *Client) DoResticForget(ctx context.Context) error {
103103
func (c *Client) DoResticPrune(ctx context.Context) error {
104104
c.Logger.Info("running 'restic prune'")
105105

106-
output, err := Prune(ctx)
106+
output, err := Prune(ctx, c.Config.Global)
107107
if err != nil {
108108
return errors.WithStack(fmt.Errorf("%s - %s", err.Error(), output))
109109
}

pkg/restic/commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,8 @@ func Forget(
346346
}
347347

348348
// Prune executes "restic prune"
349-
func Prune(ctx context.Context) ([]byte, error) {
350-
cmd := newCommand("prune", nil...)
349+
func Prune(ctx context.Context, globalOpts *GlobalOptions) ([]byte, error) {
350+
cmd := newCommand("prune", cli.StructToCLI(globalOpts)...)
351351

352352
return cli.Run(ctx, cmd)
353353
}

0 commit comments

Comments
 (0)