Skip to content

Commit e262cf5

Browse files
aegilopsCopilot
andauthored
Update src/cli.ts
Co-authored-by: Copilot <[email protected]>
1 parent c16aa51 commit e262cf5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async function main() {
5858
if (!args.enterprise && !args.org && !args.repo) throw new Error("Provide --enterprise, --org or --repo with --sync-sboms");
5959
if (args.enterprise && args.org) throw new Error("Specify only one of --enterprise or --org");
6060
if (args.repo && (args.enterprise || args.org)) throw new Error("Specify only one of --enterprise, --org, or --repo");
61-
if (!args.sbomCache) throw new Error("--sync-sboms requires --sbom-cache to write updated SBOMs to disk");
61+
if (syncing && !args.sbomCache) throw new Error("--sync-sboms requires --sbom-cache to write updated SBOMs to disk");
6262
} else {
6363
const malwareOnly = !!args["sync-malware"] && !args.sbomCache && !args.purl && !args["purl-file"] && !args["match-malware"] && !args.uploadSarif && !args.interactive;
6464
if (!malwareOnly && !args.sbomCache) throw new Error("Offline mode requires --sbom-cache unless running --sync-malware by itself");

0 commit comments

Comments
 (0)