Unverified Commit 42452dae authored by daz's avatar daz
Browse files

Add explicit `process.exit()` to avoid wait for hanging promises

When using the `@actions/cache` library to save cache entries, it seems that one
or more Promises remain unresolved after the save completes.
With Node20 this causes a delay when exiting the process: the default behaviour
now wait for these Promises to complete. Adding an explicit `Process.exit()`
removes the delay, returning to the Node 16 behaviour.

Fixes #1038
parent 34664570
Loading
Loading
Loading
Loading
+1
Changes for dist/main/index.js: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -140762,6 +140762,7 @@ function run() {
                core.info(error.stack);
            }
        }
        process.exit();
    });
}
exports.run = run;
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+3 −1
Changes for dist/post/index.js: 3 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -138072,10 +138072,12 @@ function run() {
        catch (error) {
            if (error instanceof errors_1.PostActionJobFailure) {
                core.setFailed(String(error));
                return;
            }
            else {
                handleFailure(error);
            }
        }
        process.exit();
    });
}
exports.run = run;
+1 −1

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Changes for package-lock.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@
        "eslint-plugin-prettier": "5.1.2",
        "jest": "29.7.0",
        "js-yaml": "4.1.0",
        "npm-run-all": "^4.1.5",
        "npm-run-all": "4.1.5",
        "patch-package": "8.0.0",
        "prettier": "3.1.1",
        "ts-jest": "29.1.1",
Loading