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 9914c98
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions internal/lefthook/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +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)
}
return nil, gitErr
return nil, fmt.Errorf("error replacing %s: %s", filesType, err)
}
if len(files) == 0 {
return nil, nil
Expand Down

0 comments on commit 9914c98

Please sign in to comment.