From db764dcfc8760ebbd0a892c91ec45240030d1f8e Mon Sep 17 00:00:00 2001 From: prabhu Date: Wed, 1 Nov 2023 11:36:44 +0000 Subject: [PATCH] Force version argument to be a string (#684) Signed-off-by: Prabhu Subramanian --- bin/cdxgen.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/bin/cdxgen.js b/bin/cdxgen.js index b72843c527..0be34d03db 100755 --- a/bin/cdxgen.js +++ b/bin/cdxgen.js @@ -106,14 +106,17 @@ const args = yargs(hideBin(process.argv)) }) .option("project-version", { description: "Dependency track project version", - default: "" + default: "", + type: "string" }) .option("project-id", { description: - "Dependency track project id. Either provide the id or the project name and version together" + "Dependency track project id. Either provide the id or the project name and version together", + type: "string" }) .option("parent-project-id", { - description: "Dependency track parent project id" + description: "Dependency track parent project id", + type: "string" }) .option("required-only", { type: "boolean", @@ -185,7 +188,8 @@ const args = yargs(hideBin(process.argv)) }) .option("spec-version", { description: "CycloneDX Specification version to use. Defaults to 1.5", - default: 1.5 + default: 1.5, + type: "number" }) .option("filter", { description: