Skip to content

Commit

Permalink
fix: Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Aug 22, 2022
1 parent fb27784 commit 8b704d2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions internal/lefthook/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,7 @@ func (r *Runner) buildCommandArgs(command *config.Command) ([]string, error) {
filesCommand != "" && filesType == config.SubFiles {
files, err := filesFn()
if err != nil {
var gitErr error
if filesType == config.SubFiles {
gitErr = fmt.Errorf("error running '%s': %s", filesCommand, err)
} else {
gitErr = fmt.Errorf("error replacing %s: %s", filesType, err)
}
gitErr := fmt.Errorf("error replacing %s: %s", filesType, err)
return nil, gitErr
}
if len(files) == 0 {
Expand Down

0 comments on commit 8b704d2

Please sign in to comment.