diff --git a/dist/index.js b/dist/index.js index f26ca1b8..3c587c6d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -254297,7 +254297,9 @@ function removeEmpty (obj) { function runNewman (options) { newman.run(options, (err) => { - core.setFailed('Newman run failed! ' + (err || '')) + if (err) { + core.setFailed('Newman run failed! ' + (err || '')) + } }).on('done', (err, summary) => { if (!options.suppressExitCode && (err || summary.run.failures.length)) { core.setFailed('Newman run failed! ' + (err || '')) diff --git a/index.js b/index.js index 43ebfc16..e72761c6 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,9 @@ function removeEmpty (obj) { function runNewman (options) { newman.run(options, (err) => { - core.setFailed('Newman run failed! ' + (err || '')) + if (err) { + core.setFailed('Newman run failed! ' + (err || '')) + } }).on('done', (err, summary) => { if (!options.suppressExitCode && (err || summary.run.failures.length)) { core.setFailed('Newman run failed! ' + (err || '')) diff --git a/package-lock.json b/package-lock.json index c1989218..f1e065dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "newman-action", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index c35aea91..dffd4c0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newman-action", - "version": "1.0.1", + "version": "1.0.2", "description": "Run Postman collections with Newman as a GitHub Action", "main": "dist/index.js", "repository": {