Expand description
Cross-platform shell execution
Provides a unified interface for executing shell commands across platforms:
- Unix: Uses
sh -c(resolved via PATH) - Windows: Uses Git Bash (requires Git for Windows)
This enables hooks and commands to use the same bash syntax on all platforms. On Windows, Git for Windows must be installed — this is nearly universal among Windows developers since git itself is required.
Structs§
- Cmd
- Builder for executing commands with two modes of operation.
- Shell
Config - Shell configuration for command execution
Constants§
- DIRECTIVE_
FILE_ ENV_ VAR - Environment variable removed from spawned subprocesses for security. Hooks and other child processes should not be able to write to the directive file.
Functions§
- set_
command_ timeout - Set the command timeout for the current thread.
- trace_
instant - Emit an instant trace event (a milestone marker with no duration).