Skip to content

Commit 0a65482

Browse files
committed
Delay return code propagation from exec()
1 parent bae7fee commit 0a65482

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

dist/index.js

Lines changed: 3 additions & 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.

src/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ export async function run(): Promise<void> {
5757
if (core.getInput('strict') === 'true') {
5858
swiftlintArgs.push('--strict')
5959
}
60-
await exec.exec(
60+
const returnCode = await exec.exec(
6161
path.join(portableSwiftlintDir, 'swiftlint'),
6262
swiftlintArgs,
6363
{
64+
ignoreReturnCode: true,
6465
listeners: {
6566
stdout: (data: Buffer) => {
6667
stdout += data.toString()
@@ -96,6 +97,8 @@ export async function run(): Promise<void> {
9697
startColumn: entry.character
9798
})
9899
}
100+
101+
process.exit(returnCode)
99102
} catch (error) {
100103
// Fail the workflow run if an error occurs
101104
if (error instanceof Error) core.setFailed(error.message)

0 commit comments

Comments
 (0)