Skip to content

Commit

Permalink
Merge pull request #160 from depot/fix-project-search-dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobwgillespie authored Jul 25, 2023
2 parents 0cbe313 + fcfe237 commit f47b3fe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/helpers/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,12 @@ func WorkingDirectories(files ...string) ([]string, error) {
directories = append(directories, cwd)
continue
}
directories = append(directories, filepath.Dir(file))

if fi, err := os.Stat(file); err == nil && fi.IsDir() {
directories = append(directories, file)
} else {
directories = append(directories, filepath.Dir(file))
}
}

return directories, nil
Expand Down

0 comments on commit f47b3fe

Please sign in to comment.