Skip to content

fix: don't report missing -c when -h is requested - #40

Merged
rossigee merged 1 commit into
masterfrom
fix/help-flag-spurious-config-error
Oct 13, 2026
Merged

rossigee merged 1 commit into
masterfrom
fix/help-flag-spurious-config-error

Conversation

@rossigee

Copy link
Copy Markdown
Owner

Summary

  • parseCommandLine printed Error: -c option is required whenever -c was empty, including when -h was passed.
  • The container HEALTHCHECK runs bucketsyncd -h, so its output contained a spurious error line.
  • Now the error only prints when -h is not set. Exit behaviour is unchanged.

Testing

  • go vet ./... clean
  • go test -count=1 ./... passes (Go 1.27.2)
  • golangci-lint run --no-config (v2.14.0) reports 0 issues
  • gofmt clean
  • docker run --rm <image> -h now prints only the usage line

parseCommandLine printed 'Error: -c option is required' whenever -c was
empty, including when -h was passed. The container HEALTHCHECK runs
'bucketsyncd -h', so its output contained a spurious error line.
@rossigee
rossigee merged commit ef7119d into master Oct 13, 2026
11 checks passed
@rossigee
rossigee deleted the fix/help-flag-spurious-config-error branch October 13, 2026 01:14
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.

1 participant