From 40a2f89717be9a598aa54d9985e965125f21fd54 Mon Sep 17 00:00:00 2001 From: Fernandez Ludovic Date: Mon, 12 Jun 2023 11:18:27 +0200 Subject: [PATCH] fix: out-format --- dist/post_run/index.js | 3 ++- dist/run/index.js | 3 ++- src/run.ts | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index 57323113bd..2ee8638c72 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -66637,7 +66637,7 @@ function runLint(lintPath, patchPath) { const res = yield execShellCommand(`${lintPath} cache status`); printOutput(res); } - const userArgs = core.getInput(`args`); + let userArgs = core.getInput(`args`); const addedArgs = []; const userArgsList = userArgs .trim() @@ -66656,6 +66656,7 @@ function runLint(lintPath, patchPath) { .concat("github-actions") .join(","); addedArgs.push(`--out-format=${formats}`); + userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim(); if (patchPath) { if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) { throw new Error(`please, don't specify manually --new* args when requesting only new issues`); diff --git a/dist/run/index.js b/dist/run/index.js index a2f4c030d3..d70a263b08 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -66637,7 +66637,7 @@ function runLint(lintPath, patchPath) { const res = yield execShellCommand(`${lintPath} cache status`); printOutput(res); } - const userArgs = core.getInput(`args`); + let userArgs = core.getInput(`args`); const addedArgs = []; const userArgsList = userArgs .trim() @@ -66656,6 +66656,7 @@ function runLint(lintPath, patchPath) { .concat("github-actions") .join(","); addedArgs.push(`--out-format=${formats}`); + userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim(); if (patchPath) { if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) { throw new Error(`please, don't specify manually --new* args when requesting only new issues`); diff --git a/src/run.ts b/src/run.ts index f3ae00aa26..df82c2cfa5 100644 --- a/src/run.ts +++ b/src/run.ts @@ -118,7 +118,7 @@ async function runLint(lintPath: string, patchPath: string): Promise { printOutput(res) } - const userArgs = core.getInput(`args`) + let userArgs = core.getInput(`args`) const addedArgs: string[] = [] const userArgsList = userArgs @@ -141,6 +141,7 @@ async function runLint(lintPath: string, patchPath: string): Promise { .join(",") addedArgs.push(`--out-format=${formats}`) + userArgs = userArgs.replace(/--out-format=\S*/gi, "").trim() if (patchPath) { if (userArgNames.has(`new`) || userArgNames.has(`new-from-rev`) || userArgNames.has(`new-from-patch`)) {