Skip to content

Commit

Permalink
Print the working directory on error in recursive inspection (#1933)
Browse files Browse the repository at this point in the history
  • Loading branch information
wata727 authored Dec 10, 2023
1 parent 3fd2fad commit 0845d23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ func (cli *CLI) inspect(opts Options) int {

moduleIssues, moduleChanges, err := cli.inspectModule(opts, ".", filterFiles)
if err != nil {
if len(workingDirs) > 1 {
// Print the current working directory in recursive inspection
return fmt.Errorf("%w working_dir=%s", err, wd)
}
return err
}
issues = append(issues, moduleIssues...)
Expand Down

0 comments on commit 0845d23

Please sign in to comment.