From 157436839f3b6c3d28f0224c6bf948f14e32fb68 Mon Sep 17 00:00:00 2001 From: Danila Danko Date: Tue, 2 Apr 2024 15:54:25 +0300 Subject: [PATCH] try: exit or error early --- src/main.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.ts b/src/main.ts index be8e07e..9f436aa 100644 --- a/src/main.ts +++ b/src/main.ts @@ -130,6 +130,8 @@ async function run() { core.setOutput(k, v); } }); + // https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/src/restoreImpl.ts#L99-L106 + process.exit(0) } catch (error) { if (error instanceof Error) { core.error(error); @@ -141,6 +143,8 @@ async function run() { core.error("Non-Error exception"); core.setFailed("Non-Error exception"); } + // https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/src/restoreImpl.ts#L88 + process.exit(1) } }