Skip to content

Commit de8151c

Browse files
authored
Merge pull request #1013 from mhutter/fix/empty-options
fix(restic): Don't set `--options` if there are none
2 parents 5aae824 + 8cb211a commit de8151c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

restic/cli/restic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ type clientCert struct {
5757
func New(ctx context.Context, logger logr.Logger, statsHandler StatsHandler) *Restic {
5858
globalFlags := Flags{}
5959

60-
options := strings.Split(cfg.Config.ResticOptions, ",")
61-
if len(options) > 0 {
60+
if cfg.Config.ResticOptions != "" {
61+
options := strings.Split(cfg.Config.ResticOptions, ",")
6262
logger.Info("using the following restic options", "options", options)
6363
globalFlags.AddFlag("--option", options...)
6464
}

0 commit comments

Comments
 (0)