Skip to content

Commit

Permalink
fix property check on runScript result
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Jul 31, 2024
1 parent eaf6773 commit 7d79ce4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,16 @@ const run = async () => {
command = core.toPlatformPath(command)
command += commandArgs

core.debug(` command: ${command}`)
core.debug(`command: ${command}`)

const res = await runScript(command, shell)

core.debug(res)

if (
Object.prototype.hasOwnProperty.call(res.message, 'err') ||
Object.prototype.hasOwnProperty.call(res.message, 'stderr')
Object.prototype.hasOwnProperty.call(res, 'message') &&
(Object.prototype.hasOwnProperty.call(res.message, 'err') ||
Object.prototype.hasOwnProperty.call(res.message, 'stderr'))
) {
core.setFailed(res)
} else {
Expand Down

0 comments on commit 7d79ce4

Please sign in to comment.