Skip to content

Commit

Permalink
fix: run LFS hooks after checking if hooks are skipped
Browse files Browse the repository at this point in the history
  • Loading branch information
zachahn committed Sep 19, 2024
1 parent 76cf1a0 commit 1df9289
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/lefthook/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ type executable interface {
func (r *Runner) RunAll(ctx context.Context, sourceDirs []string) ([]Result, error) {
results := make([]Result, 0, len(r.Hook.Commands)+len(r.Hook.Scripts))

if err := r.runLFSHook(ctx); err != nil {
return results, err
}

if r.Hook.DoSkip(r.Repo.State()) {
r.logSkip(r.HookName, "hook setting")
return results, nil
}

if err := r.runLFSHook(ctx); err != nil {
return results, err
}

if !r.DisableTTY && !r.Hook.Follow {
log.StartSpinner()
defer log.StopSpinner()
Expand Down

0 comments on commit 1df9289

Please sign in to comment.