Skip to content

Commit 0e26d9b

Browse files
error-message-and-flag-description-changed
1 parent 82a2e2c commit 0e26d9b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/commands/scan.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const (
122122

123123
jsonExt = ".json"
124124
xmlExt = ".xml"
125-
sbomScanTypeErrMsg = "The --sbom-only flag can only be used with scan type: sca"
125+
sbomScanTypeErrMsg = "The --sbom-only flag can only be used when the scan type is sca"
126126
BranchPrimaryPrefix = "--branch-primary="
127127
)
128128

@@ -814,7 +814,7 @@ func scanCreateSubCommand(
814814
createScanCmd.PersistentFlags().String(commonParams.ContainersImageTagFilterFlag, "", "Exclude images by image name and/or tag, ex: \"*dev\"")
815815

816816
// reading sbom-only flag
817-
createScanCmd.PersistentFlags().Bool(commonParams.SbomFlag, false, "Run an SBOM scan only on the specified XML or JSON file.")
817+
createScanCmd.PersistentFlags().Bool(commonParams.SbomFlag, false, "Scan only the specified SBOM file (supported formats xml or json)")
818818

819819
return createScanCmd
820820
}

test/integration/scan_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ func TestCreateScan_SbomScanForInvalidScanTypes(t *testing.T) {
23952395
}
23962396

23972397
err, _ := executeCommand(t, args...)
2398-
assert.Error(t, err, "The --sbom-only flag can only be used with scan type: sca")
2398+
assert.Error(t, err, "The --sbom-only flag can only be used when the scan type is sca")
23992399

24002400
}
24012401

0 commit comments

Comments
 (0)