From b85ce4ff0a87a86a7c5cbb5f51fd4bb89b4b9eda Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 10 Feb 2025 15:33:29 +0100 Subject: [PATCH] fix: path patch (#1162) --- dist/post_run/index.js | 8 ++++---- dist/run/index.js | 8 ++++---- src/run.ts | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dist/post_run/index.js b/dist/post_run/index.js index e77a41c..806438c 100644 --- a/dist/post_run/index.js +++ b/dist/post_run/index.js @@ -93982,7 +93982,7 @@ async function prepareEnv() { const binPath = await prepareLint(); const patchPath = await fetchPatch(); core.info(`Prepared env in ${Date.now() - startedAt}ms`); - return { binPath: binPath, patchPath }; + return { binPath, patchPath }; } const printOutput = (res) => { if (res.stdout) { @@ -93992,10 +93992,10 @@ const printOutput = (res) => { core.info(res.stderr); } }; -async function runLint(lintPath, patchPath) { +async function runLint(binPath, patchPath) { const debug = core.getInput(`debug`); if (debug.split(`,`).includes(`cache`)) { - const res = await execShellCommand(`${lintPath} cache status`); + const res = await execShellCommand(`${binPath} cache status`); printOutput(res); } let userArgs = core.getInput(`args`); @@ -94068,7 +94068,7 @@ async function runLint(lintPath, patchPath) { } cmdArgs.cwd = path.resolve(workingDirectory); } - const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd(); + const cmd = `${binPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd(); core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`); const startedAt = Date.now(); try { diff --git a/dist/run/index.js b/dist/run/index.js index e32f588..aeb0497 100644 --- a/dist/run/index.js +++ b/dist/run/index.js @@ -93982,7 +93982,7 @@ async function prepareEnv() { const binPath = await prepareLint(); const patchPath = await fetchPatch(); core.info(`Prepared env in ${Date.now() - startedAt}ms`); - return { binPath: binPath, patchPath }; + return { binPath, patchPath }; } const printOutput = (res) => { if (res.stdout) { @@ -93992,10 +93992,10 @@ const printOutput = (res) => { core.info(res.stderr); } }; -async function runLint(lintPath, patchPath) { +async function runLint(binPath, patchPath) { const debug = core.getInput(`debug`); if (debug.split(`,`).includes(`cache`)) { - const res = await execShellCommand(`${lintPath} cache status`); + const res = await execShellCommand(`${binPath} cache status`); printOutput(res); } let userArgs = core.getInput(`args`); @@ -94068,7 +94068,7 @@ async function runLint(lintPath, patchPath) { } cmdArgs.cwd = path.resolve(workingDirectory); } - const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd(); + const cmd = `${binPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd(); core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`); const startedAt = Date.now(); try { diff --git a/src/run.ts b/src/run.ts index fb39467..da83f1e 100644 --- a/src/run.ts +++ b/src/run.ts @@ -156,7 +156,7 @@ async function prepareEnv(): Promise { core.info(`Prepared env in ${Date.now() - startedAt}ms`) - return { binPath: binPath, patchPath } + return { binPath, patchPath } } type ExecRes = { @@ -173,10 +173,10 @@ const printOutput = (res: ExecRes): void => { } } -async function runLint(lintPath: string, patchPath: string): Promise { +async function runLint(binPath: string, patchPath: string): Promise { const debug = core.getInput(`debug`) if (debug.split(`,`).includes(`cache`)) { - const res = await execShellCommand(`${lintPath} cache status`) + const res = await execShellCommand(`${binPath} cache status`) printOutput(res) } @@ -266,7 +266,7 @@ async function runLint(lintPath: string, patchPath: string): Promise { cmdArgs.cwd = path.resolve(workingDirectory) } - const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd() + const cmd = `${binPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd() core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`)