mirror of
https://forgejo.stefka.eu/jiriks74/create-pull-request.git
synced 2025-01-18 16:01:06 +01:00
make logging ACTUALLY work
This commit is contained in:
parent
83bd37ca12
commit
6ea29d2e6e
3 changed files with 10 additions and 4 deletions
|
@ -265,7 +265,10 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
if (error instanceof Error) {
|
||||||
|
core.error(error)
|
||||||
|
if (error.stack) core.error(error.stack)
|
||||||
|
}
|
||||||
core.setFailed(utils.getErrorMessage(error))
|
core.setFailed(utils.getErrorMessage(error))
|
||||||
} finally {
|
} finally {
|
||||||
// Remove auth and restore persisted auth config if it existed
|
// Remove auth and restore persisted auth config if it existed
|
||||||
|
|
|
@ -32,7 +32,10 @@ async function run(): Promise<void> {
|
||||||
|
|
||||||
await createPullRequest(inputs)
|
await createPullRequest(inputs)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
if (error instanceof Error) {
|
||||||
|
core.error(error)
|
||||||
|
if (error.stack) core.error(error.stack)
|
||||||
|
}
|
||||||
core.setFailed(utils.getErrorMessage(error))
|
core.setFailed(utils.getErrorMessage(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,8 +147,8 @@ export function fileExistsSync(path: string): boolean {
|
||||||
throw new Error("Arg 'path' must not be empty")
|
throw new Error("Arg 'path' must not be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(path)
|
core.info(path)
|
||||||
console.log(fs.realpathSync(path))
|
core.info(fs.realpathSync(path))
|
||||||
|
|
||||||
let stats: fs.Stats
|
let stats: fs.Stats
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue