From 64d2dde73f20bb9faab1cd4e34bfd66bb54c2b3a Mon Sep 17 00:00:00 2001 From: Vladimir Vagaytsev <10628074+vvagaytsev@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:03:12 +0200 Subject: [PATCH] fix: propagate original error of unknown type --- core/src/plugins/exec/common.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/plugins/exec/common.ts b/core/src/plugins/exec/common.ts index 8e648a9fc4..6d403e3a56 100644 --- a/core/src/plugins/exec/common.ts +++ b/core/src/plugins/exec/common.ts @@ -16,7 +16,7 @@ import { exec } from "../../util/util.js" import type { Log } from "../../logger/log-entry.js" import type { PluginContext } from "../../plugin-context.js" import type { ResolvedExecAction } from "./config.js" -import { RuntimeError } from "../../exceptions.js" +import { RuntimeError, toGardenError } from "../../exceptions.js" export function getDefaultEnvVars(action: ResolvedExecAction) { return { @@ -115,6 +115,8 @@ export async function copyArtifacts( if (err.name === "CpyError") { throw new RuntimeError({ message: err.message }) } + + throw err } }) )