Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(restic): Don't set --options if there are none #1013

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mhutter
Copy link
Contributor

@mhutter mhutter commented Oct 9, 2024

Calling strings.Split on an empty string still returns a slice with one empty string in it, hence setting options.

This commit changes the implementation to first check for empty strings, before even calling strings.Split.

Checklist

For Code changes

  • Categorize the PR by setting a good title and adding one of the labels:
    bug, enhancement, documentation, change, breaking, dependency
    as they show up in the changelog
  • PR contains the label area:operator
  • Commits are signed off
  • Link this PR to related issues
  • I have not made any changes in the charts/ directory.

@mhutter mhutter requested a review from a team as a code owner October 9, 2024 12:48
@mhutter mhutter requested review from tobru and wejdross and removed request for a team October 9, 2024 12:48
Calling `strings.Split` on an empty string still returns a slice with
one empty string in it, hence setting `options`.

This commit changes the implementation to _first_ check for empty
strings, before even calling `strings.Split`.

Signed-off-by: Manuel Hutter <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants