diff --git a/src/main/index.ts b/src/main/index.ts index c01eefd..27a69d6 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -124,13 +124,16 @@ async function runKnoxctlScan(): Promise { { name: "output", flag: "--output", type: "string" }, ]; - const policyAction = core.getInput("policy_action").toLowerCase(); + let policyAction = core.getInput("policy_action").toLowerCase(); if (policyAction !== "audit" && policyAction !== "block") { throw new Error( "Invalid policy_action. Must be either 'Audit' or 'Block'.", ); } + // Capitalize the first letter + policyAction = policyAction.charAt(0).toUpperCase() + policyAction.slice(1); + // Run the policy command first await exec.exec("knoxctl", [ "scan",