Skip to content

Commit

Permalink
try this
Browse files Browse the repository at this point in the history
Signed-off-by: Ramkumar Chinchani <[email protected]>
  • Loading branch information
rchincha committed May 1, 2024
1 parent bf23c9e commit 1c46992
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Package, license string,
) error {
if _, err := os.Lstat(input); err != nil {
log.Error().Err(err).Str("path", input).Msg("unable to find path")
log.Error().Err(err).Str("path", input).Msg("unable to find path1")

return err
}
Expand Down Expand Up @@ -162,7 +162,7 @@ func BuildPackageFromDir(input string, kdoc *k8spdx.Document, kpkg *k8spdx.Packa
func BuildPackageFromFile(input string, kpkg *k8spdx.Package, license string) error {
ifo, err := os.Lstat(input)
if err != nil {
log.Error().Err(err).Str("path", input).Msg("unable to find path")
log.Error().Err(err).Str("path", input).Msg("unable to find path2")

return err
}
Expand Down Expand Up @@ -228,11 +228,14 @@ func BuildPackageFromFile(input string, kpkg *k8spdx.Package, license string) er
for _, tfil := range sdoc.Files {
conv := stbom.ConvertFromSyftFile(tfil)
conv.LicenseConcluded = license
conv.Name = filepath.Join(filepath.Dir(input), conv.Name)
tfils[conv.SPDXID()] = conv

log.Info().Str("path", conv.Name).Msg("CONVFILE1")

pfo, err := os.Lstat(conv.Name)
if err != nil {
log.Error().Err(err).Str("path", conv.Name).Msg("unable to find path")
log.Error().Err(err).Str("path", conv.Name).Msg("unable to find path3")

return err
}
Expand Down

0 comments on commit 1c46992

Please sign in to comment.