Unverified Commit c64c5722 authored by David Hadka's avatar David Hadka Committed by GitHub
Browse files

Catch and log unhandled exceptions stemming from closed file descriptor (#596)

parent cc2d767a
Loading
Loading
Loading
Loading
+4
Changes for dist/save/index.js: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -47154,6 +47154,10 @@ const cache = __importStar(__webpack_require__(692));
const core = __importStar(__webpack_require__(470));
const constants_1 = __webpack_require__(196);
const utils = __importStar(__webpack_require__(443));
// Catch and log any unhandled exceptions.  These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
// throw an uncaught exception.  Instead of failing this action, just warn.
process.on("uncaughtException", e => utils.logWarning(e.message));
function run() {
    return __awaiter(this, void 0, void 0, function* () {
        try {
+1 −1
Changes for package-lock.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
{
  "name": "cache",
  "version": "2.1.5",
  "version": "2.1.6",
  "lockfileVersion": 1,
  "requires": true,
  "dependencies": {
+1 −1
Changes for package.json: 1 added line, 1 removed line.
Original line number Diff line number Diff line
{
  "name": "cache",
  "version": "2.1.5",
  "version": "2.1.6",
  "private": true,
  "description": "Cache dependencies and build outputs",
  "main": "dist/restore/index.js",
+5
Changes for src/save.ts: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,11 @@ import * as core from "@actions/core";
import { Events, Inputs, State } from "./constants";
import * as utils from "./utils/actionUtils";

// Catch and log any unhandled exceptions.  These exceptions can leak out of the uploadChunk method in
// @actions/toolkit when a failed upload closes the file descriptor causing any in-process reads to
// throw an uncaught exception.  Instead of failing this action, just warn.
process.on("uncaughtException", e => utils.logWarning(e.message));

async function run(): Promise<void> {
    try {
        if (utils.isGhes()) {
+197 −197

File changed.

Contains only whitespace changes.