feat: improve log about pwd/cwd (#1033)

This commit is contained in:
Ludovic Fernandez 2024-05-05 01:13:21 +02:00 committed by GitHub
parent 21e9e6b47f
commit 38e1018663
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 6 deletions

4
dist/post_run/index.js generated vendored
View File

@ -89329,8 +89329,8 @@ async function runLint(lintPath, patchPath) {
break;
}
}
const workingDirectory = core.getInput(`working-directory`);
const cmdArgs = {};
const workingDirectory = core.getInput(`working-directory`);
if (workingDirectory) {
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
throw new Error(`working-directory (${workingDirectory}) was not a path`);
@ -89341,7 +89341,7 @@ async function runLint(lintPath, patchPath) {
cmdArgs.cwd = path.resolve(workingDirectory);
}
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd();
core.info(`Running [${cmd}] in [${cmdArgs.cwd || ``}] ...`);
core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`);
const startedAt = Date.now();
try {
const res = await execShellCommand(cmd, cmdArgs);

4
dist/run/index.js generated vendored
View File

@ -89329,8 +89329,8 @@ async function runLint(lintPath, patchPath) {
break;
}
}
const workingDirectory = core.getInput(`working-directory`);
const cmdArgs = {};
const workingDirectory = core.getInput(`working-directory`);
if (workingDirectory) {
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
throw new Error(`working-directory (${workingDirectory}) was not a path`);
@ -89341,7 +89341,7 @@ async function runLint(lintPath, patchPath) {
cmdArgs.cwd = path.resolve(workingDirectory);
}
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd();
core.info(`Running [${cmd}] in [${cmdArgs.cwd || ``}] ...`);
core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`);
const startedAt = Date.now();
try {
const res = await execShellCommand(cmd, cmdArgs);

View File

@ -233,8 +233,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
}
}
const workingDirectory = core.getInput(`working-directory`)
const cmdArgs: ExecOptions = {}
const workingDirectory = core.getInput(`working-directory`)
if (workingDirectory) {
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
throw new Error(`working-directory (${workingDirectory}) was not a path`)
@ -247,7 +248,7 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd()
core.info(`Running [${cmd}] in [${cmdArgs.cwd || ``}] ...`)
core.info(`Running [${cmd}] in [${cmdArgs.cwd || process.cwd()}] ...`)
const startedAt = Date.now()
try {