Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Invalid Array Length error when severity_threshold exceeded
Browse files Browse the repository at this point in the history
frankgrimes97 committed Dec 2, 2024
1 parent 12f5803 commit f5a4d10
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
@@ -116,9 +116,9 @@ async function run(): Promise<void> {
}
}
if (vulnidColorized.length > 0 && vulnsevColorized.length > 0) {
const pkgTxt = `${chalk.magenta(v.PkgName)}${new Array(40 - chalk.magenta(v.PkgName).length).join(' ')}`;
const vulnidTxt = `${vulnidColorized}${new Array(40 - vulnidColorized.length).join(' ')}`;
const vulnsevTxt = `${vulnsevColorized}${new Array(30 - vulnsevColorized.length).join(' ')}`;
const pkgTxt = `${chalk.magenta(v.PkgName).padEnd(40)}`;
const vulnidTxt = `${vulnidColorized.padEnd(40)}`;
const vulnsevTxt = `${vulnsevColorized.padEnd(30)}`;
res.unhealthyMsg = `${pkgTxt} ${vulnidTxt} ${vulnsevTxt} ${v.Title}`;
isUnhealthy = true;
}

0 comments on commit f5a4d10

Please sign in to comment.