Skip to content

Commit

Permalink
Handle os.ErrPermission for directories
Browse files Browse the repository at this point in the history
  • Loading branch information
pastuxso committed Aug 7, 2024
1 parent a26419f commit 097e13f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ func (p *Project) loadFromDirectory(

err := util.Walk(p.fs, ".", func(path string, info fs.FileInfo, err error) error {
if err != nil {
if errors.Is(err, os.ErrPermission) {
if info.IsDir() {
return filepath.SkipDir
}
return nil
}
return err
}

Expand Down

0 comments on commit 097e13f

Please sign in to comment.