feat: improve log about pwd/cwd (#1033)
This commit is contained in:
parent
21e9e6b47f
commit
38e1018663
4
dist/post_run/index.js
generated
vendored
4
dist/post_run/index.js
generated
vendored
@ -89329,8 +89329,8 @@ async function runLint(lintPath, patchPath) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const workingDirectory = core.getInput(`working-directory`);
|
|
||||||
const cmdArgs = {};
|
const cmdArgs = {};
|
||||||
|
const workingDirectory = core.getInput(`working-directory`);
|
||||||
if (workingDirectory) {
|
if (workingDirectory) {
|
||||||
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
||||||
throw new Error(`working-directory (${workingDirectory}) was not a path`);
|
throw new Error(`working-directory (${workingDirectory}) was not a path`);
|
||||||
@ -89341,7 +89341,7 @@ async function runLint(lintPath, patchPath) {
|
|||||||
cmdArgs.cwd = path.resolve(workingDirectory);
|
cmdArgs.cwd = path.resolve(workingDirectory);
|
||||||
}
|
}
|
||||||
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd();
|
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();
|
const startedAt = Date.now();
|
||||||
try {
|
try {
|
||||||
const res = await execShellCommand(cmd, cmdArgs);
|
const res = await execShellCommand(cmd, cmdArgs);
|
||||||
|
4
dist/run/index.js
generated
vendored
4
dist/run/index.js
generated
vendored
@ -89329,8 +89329,8 @@ async function runLint(lintPath, patchPath) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const workingDirectory = core.getInput(`working-directory`);
|
|
||||||
const cmdArgs = {};
|
const cmdArgs = {};
|
||||||
|
const workingDirectory = core.getInput(`working-directory`);
|
||||||
if (workingDirectory) {
|
if (workingDirectory) {
|
||||||
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
||||||
throw new Error(`working-directory (${workingDirectory}) was not a path`);
|
throw new Error(`working-directory (${workingDirectory}) was not a path`);
|
||||||
@ -89341,7 +89341,7 @@ async function runLint(lintPath, patchPath) {
|
|||||||
cmdArgs.cwd = path.resolve(workingDirectory);
|
cmdArgs.cwd = path.resolve(workingDirectory);
|
||||||
}
|
}
|
||||||
const cmd = `${lintPath} run ${addedArgs.join(` `)} ${userArgs}`.trimEnd();
|
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();
|
const startedAt = Date.now();
|
||||||
try {
|
try {
|
||||||
const res = await execShellCommand(cmd, cmdArgs);
|
const res = await execShellCommand(cmd, cmdArgs);
|
||||||
|
@ -233,8 +233,9 @@ async function runLint(lintPath: string, patchPath: string): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const workingDirectory = core.getInput(`working-directory`)
|
|
||||||
const cmdArgs: ExecOptions = {}
|
const cmdArgs: ExecOptions = {}
|
||||||
|
|
||||||
|
const workingDirectory = core.getInput(`working-directory`)
|
||||||
if (workingDirectory) {
|
if (workingDirectory) {
|
||||||
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
if (!fs.existsSync(workingDirectory) || !fs.lstatSync(workingDirectory).isDirectory()) {
|
||||||
throw new Error(`working-directory (${workingDirectory}) was not a path`)
|
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()
|
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()
|
const startedAt = Date.now()
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user