diff --git a/artifactory/commands/npm/publish.go b/artifactory/commands/npm/publish.go index 86b0ab248..f8f3327aa 100644 --- a/artifactory/commands/npm/publish.go +++ b/artifactory/commands/npm/publish.go @@ -383,7 +383,7 @@ func (npc *NpmPublishCommand) setPackageInfo() error { } if fileInfo.IsDir() { - npc.packageInfo, err = biutils.ReadPackageInfoFromPackageJson(npc.publishPath, npc.npmVersion) + npc.packageInfo, err = biutils.ReadPackageInfoFromPackageJsonIfExists(npc.publishPath, npc.npmVersion) return err } log.Debug("The provided path is not a directory, we assume this is a compressed npm package") diff --git a/go.mod b/go.mod index 673d6962d..36072b043 100644 --- a/go.mod +++ b/go.mod @@ -101,4 +101,4 @@ require ( // replace github.com/jfrog/jfrog-client-go => github.com/jfrog/jfrog-client-go v1.28.1-0.20231003120621-90e9d7ea05e9 -// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go dev +replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20231019085746-e1b192457664 diff --git a/go.sum b/go.sum index bb400aa67..84a2548f9 100644 --- a/go.sum +++ b/go.sum @@ -196,8 +196,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jedib0t/go-pretty/v6 v6.4.8 h1:HiNzyMSEpsBaduKhmK+CwcpulEeBrTmxutz4oX/oWkg= github.com/jedib0t/go-pretty/v6 v6.4.8/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs= -github.com/jfrog/build-info-go v1.9.13 h1:OeoGzPVK/O4TOUYk35uL4bXg/hleyqMrjGjjmyLOYrg= -github.com/jfrog/build-info-go v1.9.13/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= +github.com/jfrog/build-info-go v1.8.9-0.20231019085746-e1b192457664 h1:6DIV7SpTEBD3xmOuUy9MoOaOw4bFhX0F3FgSyTTtgYQ= +github.com/jfrog/build-info-go v1.8.9-0.20231019085746-e1b192457664/go.mod h1:ujJ8XQZMdT2tMkLSMJNyDd1pCY+duwHdjV+9or9FLIg= github.com/jfrog/gofrog v1.3.1 h1:QqAwQXCVReT724uga1AYqG/ZyrNQ6f+iTxmzkb+YFQk= github.com/jfrog/gofrog v1.3.1/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0= github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYLipdsOFMY= diff --git a/xray/commands/audit/sca/npm/npm.go b/xray/commands/audit/sca/npm/npm.go index 9c863f877..3574a3065 100644 --- a/xray/commands/audit/sca/npm/npm.go +++ b/xray/commands/audit/sca/npm/npm.go @@ -24,7 +24,7 @@ func BuildDependencyTree(params utils.AuditParams) (dependencyTrees []*xrayUtils if err != nil { return } - packageInfo, err := biutils.ReadPackageInfoFromPackageJson(currentDir, npmVersion) + packageInfo, err := biutils.ReadPackageInfoFromPackageJsonIfExists(currentDir, npmVersion) if err != nil { return } diff --git a/xray/commands/audit/sca/yarn/yarn.go b/xray/commands/audit/sca/yarn/yarn.go index ed15121dc..60ce98fd8 100644 --- a/xray/commands/audit/sca/yarn/yarn.go +++ b/xray/commands/audit/sca/yarn/yarn.go @@ -20,7 +20,7 @@ func BuildDependencyTree() (dependencyTrees []*xrayUtils.GraphNode, uniqueDeps [ return } - packageInfo, err := biUtils.ReadPackageInfoFromPackageJson(currentDir, nil) + packageInfo, err := biUtils.ReadPackageInfoFromPackageJsonIfExists(currentDir, nil) if errorutils.CheckError(err) != nil { return }