You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: wt hook pre-start uses FailFast instead of Warn #1703
wt hook pre-start uses HookFailureStrategy::FailFast (aborts on failure), but execute_pre_start_commands during automatic worktree creation uses HookFailureStrategy::Warn (warns and continues).
The documentation in wt hook --help explicitly says:
failure aborts the operation (except pre-start, which warns and continues)
Reproduction
# Configure a pre-start hook that fails
wt config create --hooks.pre-start='["false"]'# Manual invocation aborts (bug — should warn and continue)
wt hook pre-start # exits non-zero# Automatic invocation during create warns and continues (correct)
wt switch --create test-branch
Root Cause
In src/commands/hook_commands.rs:265, HookType::PreStart is grouped with PreSwitch, PreRemove, PreCommit, and PreMerge in the FailFast match arm. It should have its own match arm using HookFailureStrategy::Warn, matching the behavior in src/commands/worktree/hooks.rs:28.
Fix
Separate PreStart from the FailFast group and give it Warn strategy.
Activity
fix: use Warn strategy for `wt hook pre-start` to match automatic beh…