Skip to content

feat: add --skip-invalid-hooks flag#879

Open
marxus wants to merge 2 commits into
flant:mainfrom
marxus:feat/skip-invalid-hooks
Open

feat: add --skip-invalid-hooks flag#879
marxus wants to merge 2 commits into
flant:mainfrom
marxus:feat/skip-invalid-hooks

Conversation

@marxus
Copy link
Copy Markdown

@marxus marxus commented May 19, 2026

Summary

  • Adds --skip-invalid-hooks CLI flag (also $SHELL_OPERATOR_SKIP_INVALID_HOOKS)
  • When enabled, hooks that fail --config (bad exit code, invalid JSON, or schema violation) are logged as warnings and skipped instead of aborting startup
  • Adds a unit test verifying that a valid hook is registered while an invalid one is skipped

Test plan

  • go test ./pkg/hook/...
  • Start shell-operator with a broken hook and --skip-invalid-hooks=true, verify operator starts and broken hook is absent
  • Start shell-operator with a broken hook without the flag, verify operator exits non-zero

🤖 Generated with Claude Code

marxus and others added 2 commits May 19, 2026 22:30
When enabled, hooks that fail --config (bad exit code, invalid JSON, or
schema violation) are logged as warnings and skipped instead of aborting
startup. Can also be set via $SHELL_OPERATOR_SKIP_INVALID_HOOKS.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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