Skip to content

Commit

Permalink
fix: ignore paths that don't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
  • Loading branch information
rchincha committed Feb 15, 2024
1 parent a5a889b commit 51bb7ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Packa

fhandle, err := os.Open(path)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil
}

return err
}
defer fhandle.Close()
Expand Down

0 comments on commit 51bb7ac

Please sign in to comment.