Skip to content

Commit d437f78

Browse files
authored
Print error in Action log (#112)
1 parent 7c99145 commit d437f78

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

action.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {getInput, setFailed} from '@actions/core'
1+
import {getInput, setFailed, error as logerror} from '@actions/core'
22
import {join, parse} from 'path'
33
import ActionDetails from './utils/details'
44
import {context} from '@actions/github'
@@ -24,6 +24,7 @@ import {context} from '@actions/github'
2424
await ad.getDetails()
2525
// await ad.postComment()
2626
} catch (error) {
27+
logerror(`Error: ${error}.`)
2728
setFailed(error.message)
2829
}
2930
})()

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utils/details.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Please make sure this is intended by providing a business reason via comment bel
257257
Please delete \`${owner}/${repo}\` from \`${this.allowList}\`!`,
258258
position,
259259
)
260+
throw error
260261
}
261262
}
262263
}

0 commit comments

Comments
 (0)