Skip to content

Commit

Permalink
fix restic forget global opts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hermsi1337 committed Jun 16, 2023
1 parent e7e7a41 commit 6dd824f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/restic/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (c *Client) DoResticForget(ctx context.Context) error {
func (c *Client) DoResticPrune(ctx context.Context) error {
c.Logger.Info("running 'restic prune'")

output, err := Prune(ctx)
output, err := Prune(ctx, c.Config.Global)
if err != nil {
return errors.WithStack(fmt.Errorf("%s - %s", err.Error(), output))
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/restic/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ func Forget(
}

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

return cli.Run(ctx, cmd)
}
Expand Down

0 comments on commit 6dd824f

Please sign in to comment.