From b4b8c7160d5d70a45ae8945faf79ccf72b7fe03d Mon Sep 17 00:00:00 2001 From: Edward McFarlane Date: Wed, 24 Jul 2024 21:12:29 +0200 Subject: [PATCH] Fix token restriction --- dist/index.js | 3 ++- src/main.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 1a7a92e..2592202 100644 --- a/dist/index.js +++ b/dist/index.js @@ -45849,7 +45849,8 @@ async function runWorkflow(bufPath, inputs, moduleNames) { async function login(bufPath, inputs) { const { token, domain } = inputs; if (token == "") { - throw new Error("No token provided"); + core.debug("Skipping login, no token provided"); + return; } core.debug(`Logging in to ${domain}`); await exec.exec(bufPath, ["registry", "login", domain, "--token-stdin"], { diff --git a/src/main.ts b/src/main.ts index 3748dbd..d0d3ddf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -175,7 +175,8 @@ async function runWorkflow( async function login(bufPath: string, inputs: Inputs) { const { token, domain } = inputs; if (token == "") { - throw new Error("No token provided"); + core.debug("Skipping login, no token provided"); + return; } core.debug(`Logging in to ${domain}`); await exec.exec(bufPath, ["registry", "login", domain, "--token-stdin"], {