Skip to content

Commit

Permalink
feat: improve log about pwd/cwd (#1033)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed May 4, 2024
1 parent 21e9e6b commit 38e1018
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions dist/post_run/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/run/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions src/run.ts
Expand Up @@ -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`)
Expand All @@ -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 {
Expand Down

0 comments on commit 38e1018

Please sign in to comment.