Make build-rpm.sh executable and test completion generation #2

Merged
benvin merged 1 commits from benvin/completion-fix into main 2026-08-23 19:00:54 +10:00
Member

Why

The v0.1.0 tag pipeline failed at the package step. scripts/build-rpm.sh was committed mode 100644, so CI's ./scripts/build-rpm.sh invocation failed with permission denied (rc 126) before any completion generation ran. The cobra completion subcommand itself already works for all four entrypoints (cobra v1.10.2 auto-registers completion even on the no-subcommand argv[0]-dispatched roots), matching node-lookup's pattern — the only difference was the missing executable bit.

Changes

  • Restores the executable bit on scripts/build-rpm.sh (100755, matching node-lookup)
  • Adds TestCompletionAllEntrypointsAndShells guarding bash/zsh/fish completion generation through the argv[0] dispatch for chlog/chcat/chtail/chgrep

Verified

  • go test -race ./..., go vet, gofmt clean
  • ./scripts/build-rpm.sh v0.1.1 runs end to end locally: all 12 completion files generate and the RPM packages binary + symlinks + completions
## Why The v0.1.0 tag pipeline failed at the `package` step. `scripts/build-rpm.sh` was committed mode 100644, so CI's `./scripts/build-rpm.sh` invocation failed with permission denied (rc 126) before any completion generation ran. The cobra completion subcommand itself already works for all four entrypoints (cobra v1.10.2 auto-registers `completion` even on the no-subcommand argv[0]-dispatched roots), matching node-lookup's pattern — the only difference was the missing executable bit. ## Changes - Restores the executable bit on `scripts/build-rpm.sh` (100755, matching node-lookup) - Adds `TestCompletionAllEntrypointsAndShells` guarding bash/zsh/fish completion generation through the argv[0] dispatch for chlog/chcat/chtail/chgrep ## Verified - `go test -race ./...`, `go vet`, `gofmt` clean - `./scripts/build-rpm.sh v0.1.1` runs end to end locally: all 12 completion files generate and the RPM packages binary + symlinks + completions
unkin-agent added 1 commit 2026-08-23 17:29:42 +10:00
Make build-rpm.sh executable and test completion generation
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
a849c26509
The v0.1.0 tag pipeline failed at the package step: build-rpm.sh was
committed mode 100644, so CI's ./scripts/build-rpm.sh invocation died
with permission denied before any completions were generated.

- Restore the executable bit on scripts/build-rpm.sh (mode 100755,
  matching node-lookup)
- Add TestCompletionAllEntrypointsAndShells covering bash/zsh/fish
  completion generation through the argv[0] dispatch for all four
  entrypoints (chlog/chcat/chtail/chgrep)
benvin merged commit dfd4efd782 into main 2026-08-23 19:00:54 +10:00
benvin deleted branch benvin/completion-fix 2026-08-23 19:00:54 +10:00
Sign in to join this conversation.