From 5349026fdedeb8795f1a1aad6e26a04f7ca10ad7 Mon Sep 17 00:00:00 2001 From: Tsiry Sandratraina Date: Fri, 3 May 2024 05:15:34 +0000 Subject: [PATCH] handle empty engine-version handle empty engine-version --- dist/setup.js | 4 +++- src/setup.ts | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dist/setup.js b/dist/setup.js index d296262..25c2bc8 100644 --- a/dist/setup.js +++ b/dist/setup.js @@ -33,7 +33,9 @@ export default async ({ daggerVersion, engineVersion, wasm, pipeline, args, work ]); await exec("sudo", ["mv", "bin/dagger", "/usr/local/bin"]); const version = await verifyFluentCI("fluentci"); - action.exportVariable("FLUENTCI_ENGINE_VERSION", engineVersion.startsWith("v") ? engineVersion : `v${engineVersion}`); + if (engineVersion) { + action.exportVariable("FLUENTCI_ENGINE_VERSION", engineVersion.startsWith("v") ? engineVersion : `v${engineVersion}`); + } if (pipeline) { if (wasm) { if (!args.length) { diff --git a/src/setup.ts b/src/setup.ts index d1a0c99..0ae78ec 100644 --- a/src/setup.ts +++ b/src/setup.ts @@ -50,10 +50,12 @@ export default async ({ await exec("sudo", ["mv", "bin/dagger", "/usr/local/bin"]); const version = await verifyFluentCI("fluentci"); - action.exportVariable( - "FLUENTCI_ENGINE_VERSION", - engineVersion.startsWith("v") ? engineVersion : `v${engineVersion}` - ); + if (engineVersion) { + action.exportVariable( + "FLUENTCI_ENGINE_VERSION", + engineVersion.startsWith("v") ? engineVersion : `v${engineVersion}` + ); + } if (pipeline) { if (wasm) {