Skip to content

fix: corrects the GCS credentials flag in command examples - #3195

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
fix-gcs-example-credentials-flag
Aug 30, 2026
Merged

fix: corrects the GCS credentials flag in command examples#3195
kodiakhq[bot] merged 1 commit into
mainfrom
fix-gcs-example-credentials-flag

Conversation

@gaganhr94

Copy link
Copy Markdown
Member

Fixes #3193.

The Example: strings on both gcs commands advertised a
--gcs-credentials-path flag. That flag is not registered — pkg/cli/store.go:130
registers gcp-credentials-path — so copying the example out of --help failed
with unknown flag. The gcsCredentialsPathFlag constant declared two lines
above each example already held the correct value, so this is only the literal
in the example drifting from it.

Two changes:

  • cmd/guaccollect/cmd/gcs.go:34 and cmd/guacone/cmd/gcs.go:54:
    --gcs-credentials-path -> --gcp-credentials-path.
  • cmd/guaccollect/cmd/gcs.go:34 also invoked guacone collect gcs.
    guaccollect registers gcs as a top-level subcommand (rootCmd.AddCommand(gcsCmd),
    line 143) and has no collect grouping, so the binary and path are corrected
    to guaccollect gcs.

Verified: go build ./cmd/..., go vet and go test on both changed packages
all pass. cmd/guacone/cmd/gcs_test.go:37 already asserts the correct flag name
in its error text, so the tests agreed with the fix before this change.

The same typo had propagated into the docs; fixed in guacsec/guac-docs#244.

@gaganhr94
gaganhr94 force-pushed the fix-gcs-example-credentials-flag branch from ec4093a to 3596aa9 Compare August 29, 2026 16:11
The Example strings for both gcs commands advertised a
--gcs-credentials-path flag, which is not registered. pkg/cli/store.go
registers gcp-credentials-path, and the constant declared two lines above
each example already held the correct value. Copying the example out of
--help failed with "unknown flag".

The guaccollect example also invoked "guacone collect gcs". guaccollect
registers gcs as a top-level subcommand and has no collect grouping, so
that is corrected to "guaccollect gcs".

Fixes #3193

Signed-off-by: gaganhr94 <hrgagan4@gmail.com>
@gaganhr94
gaganhr94 force-pushed the fix-gcs-example-credentials-flag branch from 3596aa9 to 136ea18 Compare August 29, 2026 16:19
@kodiakhq
kodiakhq Bot merged commit 9d0c626 into main Aug 30, 2026
12 checks passed
@kodiakhq
kodiakhq Bot deleted the fix-gcs-example-credentials-flag branch August 30, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GCS collector Example strings reference a nonexistent --gcs-credentials-path flag

2 participants