Skip to content

Commit

Permalink
Fix: Use getBooleanInput for boolean flags (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewokcami authored Oct 26, 2023
1 parent 0a71190 commit 0630590
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22031,10 +22031,10 @@ function run() {
const SCAN_PR = core.getBooleanInput("pr");
const SCAN_PR_BASELINE = core.getInput("pr_baseline");
const SCAN_TAGS = core.getInput("tags");
const SCAN_DEPENDENCIES = core.getInput("scan_dependencies");
const SCAN_SECRETS = core.getInput("scan_secrets");
const SCAN_GIT_LOGS = core.getInput("scan_git_logs");
const RUN_STATS = core.getInput("run_stats");
const SCAN_DEPENDENCIES = core.getBooleanInput("scan_dependencies");
const SCAN_SECRETS = core.getBooleanInput("scan_secrets");
const SCAN_GIT_LOGS = core.getBooleanInput("scan_git_logs");
const RUN_STATS = core.getBooleanInput("run_stats");
const ADDITIONAL_ARGS = core.getInput("additional_args");
const EXPORT_SCAN_RESULT_ARTIFACT = core.getBooleanInput("export_scan_result_artifact");
const ADDITION_OPTIONS = ADDITIONAL_ARGS.split(" ");
Expand Down Expand Up @@ -22138,7 +22138,7 @@ function run() {
}
let scan_command = `endorctl`;
options.unshift("scan", "--path=."); // Standard options for scanner
if (RUN_STATS === "true") {
if (RUN_STATS) {
// Wrap scan commmand in `time -v` to get stats
if (platform.os === constants_1.EndorctlAvailableOS.Windows) {
core.info("Timing is not supported on Windows runners");
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/scan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,10 @@ async function run() {
const SCAN_PR = core.getBooleanInput("pr");
const SCAN_PR_BASELINE = core.getInput("pr_baseline");
const SCAN_TAGS = core.getInput("tags");
const SCAN_DEPENDENCIES = core.getInput("scan_dependencies");
const SCAN_SECRETS = core.getInput("scan_secrets");
const SCAN_GIT_LOGS = core.getInput("scan_git_logs");
const RUN_STATS = core.getInput("run_stats");
const SCAN_DEPENDENCIES = core.getBooleanInput("scan_dependencies");
const SCAN_SECRETS = core.getBooleanInput("scan_secrets");
const SCAN_GIT_LOGS = core.getBooleanInput("scan_git_logs");
const RUN_STATS = core.getBooleanInput("run_stats");
const ADDITIONAL_ARGS = core.getInput("additional_args");
const EXPORT_SCAN_RESULT_ARTIFACT = core.getBooleanInput(
"export_scan_result_artifact"
Expand Down Expand Up @@ -310,7 +310,7 @@ async function run() {

let scan_command = `endorctl`;
options.unshift("scan", "--path=."); // Standard options for scanner
if (RUN_STATS === "true") {
if (RUN_STATS) {
// Wrap scan commmand in `time -v` to get stats
if (platform.os === EndorctlAvailableOS.Windows) {
core.info("Timing is not supported on Windows runners");
Expand Down

0 comments on commit 0630590

Please sign in to comment.