Skip to content

Commit 3b7657e

Browse files
committed
Fixed test case
1 parent 032be64 commit 3b7657e

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

artifactory/commands/npm/npmPublishHandler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ func (npu *npmPublish) upload() (err error) {
2626

2727
// If requested, perform a Xray binary scan before deployment. If a FailBuildError is returned, skip the deployment.
2828
if npu.xrayScan {
29-
err = errors.Join(err, performXrayScan(packedFilePath, npu.repo, npu.serverDetails, npu.scanOutputFormat))
29+
if err = performXrayScan(packedFilePath, npu.repo, npu.serverDetails, npu.scanOutputFormat); err != nil {
30+
return
31+
}
3032
}
3133
err = errors.Join(err, npu.publishPackage(npu.executablePath, packedFilePath, npu.serverDetails, target))
3234
}

artifactory/commands/npm/rtPublishHandler.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ func (nru *npmRtUpload) upload() (err error) {
2828

2929
// If requested, perform a Xray binary scan before deployment. If a FailBuildError is returned, skip the deployment.
3030
if nru.xrayScan {
31-
err = errors.Join(err, performXrayScan(packedFilePath, nru.repo, nru.serverDetails, nru.scanOutputFormat))
31+
if err = performXrayScan(packedFilePath, nru.repo, nru.serverDetails, nru.scanOutputFormat); err != nil {
32+
return
33+
}
3234
}
3335
err = errors.Join(err, nru.doDeploy(target, nru.serverDetails, packedFilePath))
3436
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ require (
121121
sigs.k8s.io/yaml v1.4.0 // indirect
122122
)
123123

124-
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413215109-294edb8594bb
124+
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413220436-b46ff5daaf5e
125125

126126
replace github.com/jfrog/jfrog-client-go => github.com/fluxxBot/jfrog-client-go v1.28.1-0.20250413214704-1b6cdf0520c6
127127

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ github.com/elazarl/goproxy v1.7.2 h1:Y2o6urb7Eule09PjlhQRGNsqRfPmYI3KKQLFpCAV3+o
5454
github.com/elazarl/goproxy v1.7.2/go.mod h1:82vkLNir0ALaW14Rc399OTTjyNREgmdL2cVoIbS6XaE=
5555
github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc=
5656
github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ=
57-
github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413215109-294edb8594bb h1:StUinFdDlk+8eY6jJ1qX5o9eAHSL7ub7gJGwQZFaIyo=
58-
github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413215109-294edb8594bb/go.mod h1:eV3CTP/F4nEYE7p4WojZc4ruU1/3sXj0o/ctnjmO5fw=
57+
github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413220436-b46ff5daaf5e h1:q0BinSmz7ZhYbkuow5I+R3DhOIHFIcKk/ZxkE/GSW1w=
58+
github.com/fluxxBot/jfrog-cli-core/v2 v2.31.1-0.20250413220436-b46ff5daaf5e/go.mod h1:eV3CTP/F4nEYE7p4WojZc4ruU1/3sXj0o/ctnjmO5fw=
5959
github.com/fluxxBot/jfrog-client-go v1.28.1-0.20250413214704-1b6cdf0520c6 h1:krAN+7hGggGDXfAlcC8eni2QxWfW7I5JVNPvhI3vS4U=
6060
github.com/fluxxBot/jfrog-client-go v1.28.1-0.20250413214704-1b6cdf0520c6/go.mod h1:uRmT8Q1SJymIzId01v0W1o8mGqrRfrwUF53CgEMsH0U=
6161
github.com/forPelevin/gomoji v1.3.0 h1:WPIOLWB1bvRYlKZnSSEevLt3IfKlLs+tK+YA9fFYlkE=

0 commit comments

Comments
 (0)