Documentation
¶
Overview ¶
Package block_non_path_ctx implements the ctx system block-non-path-ctx subcommand.
It blocks non-PATH ctx invocations such as ./ctx, go run ./cmd/ctx, and absolute-path ctx calls to enforce consistent binary usage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Cmd ¶
Cmd returns the "ctx system block-non-path-ctx" subcommand.
Returns:
- *cobra.Command: Configured block-non-path-ctx subcommand
func Run ¶
Run executes the block-non-path-ctx hook logic.
Reads a hook input from stdin, checks the command against patterns that invoke ctx via relative paths, go run, or absolute paths instead of the PATH-installed binary, and emits a block response if matched.
Parameters:
- cmd: Cobra command for output
- stdin: standard input for hook JSON
Returns:
- error: Always nil (hook errors are non-fatal)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.