Skip to content

Commit 9914c98

Browse files
committed
fix: Fix linting
1 parent fb27784 commit 9914c98

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

internal/lefthook/runner/runner.go

+1-7
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,7 @@ func (r *Runner) buildCommandArgs(command *config.Command) ([]string, error) {
288288
filesCommand != "" && filesType == config.SubFiles {
289289
files, err := filesFn()
290290
if err != nil {
291-
var gitErr error
292-
if filesType == config.SubFiles {
293-
gitErr = fmt.Errorf("error running '%s': %s", filesCommand, err)
294-
} else {
295-
gitErr = fmt.Errorf("error replacing %s: %s", filesType, err)
296-
}
297-
return nil, gitErr
291+
return nil, fmt.Errorf("error replacing %s: %s", filesType, err)
298292
}
299293
if len(files) == 0 {
300294
return nil, nil

0 commit comments

Comments
 (0)