Skip to content

Commit 0601767

Browse files
authored
Merge pull request #98 from lazy-actions/create-pull-request/patch
Transpile
2 parents 9de95ee + e7d128a commit 0601767

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dist/index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4388,6 +4388,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
43884388
Object.defineProperty(exports, "__esModule", { value: true });
43894389
exports.TrivyCmdOptionValidator = void 0;
43904390
const fs = __importStar(__webpack_require__(747));
4391+
const core = __importStar(__webpack_require__(470));
43914392
class TrivyCmdOptionValidator {
43924393
constructor(option) {
43934394
this.option = option;
@@ -4422,7 +4423,11 @@ class TrivyCmdOptionValidator {
44224423
return true;
44234424
}
44244425
validateTemplate() {
4425-
const template = this.option.template;
4426+
if (!this.option.template.startsWith('@')) {
4427+
core.warning('template parameter prefix must be "@"');
4428+
this.option.template = `@${this.option.template}`;
4429+
}
4430+
const template = this.option.template.replace('@', '');
44264431
const exists = fs.existsSync(template);
44274432
if (!exists) {
44284433
throw new Error(`Could not find ${template}`);
@@ -10289,7 +10294,7 @@ class Inputs {
1028910294
severity: core.getInput('severity').replace(/\s+/g, ''),
1029010295
vulnType: core.getInput('vuln_type').replace(/\s+/g, ''),
1029110296
ignoreUnfixed: core.getInput('ignore_unfixed').toLowerCase() === 'true',
10292-
template: core.getInput('template') || __webpack_require__.ab + "default.tpl"
10297+
template: core.getInput('template') || `@${__dirname}/default.tpl`
1029310298
}
1029410299
};
1029510300
this.issue = {

0 commit comments

Comments
 (0)