From 06ce3b622f7bf413dfe4913dd55abbaba1245f14 Mon Sep 17 00:00:00 2001 From: Henrik Poulsen Date: Tue, 11 Jan 2022 14:34:27 +0100 Subject: [PATCH] Return undefined if GHES_TOKEN is not set when running on GHES --- dist/setup/index.js | 4 +++- src/install-python.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 5551ef81..c699e65d 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -52266,7 +52266,9 @@ const utils_1 = __webpack_require__(163); const TOKEN = core.getInput('token'); const GHES_TOKEN = core.getInput('ghes_token'); const AUTH = utils_1.isGhes() - ? `token ${GHES_TOKEN}` + ? GHES_TOKEN + ? `token ${GHES_TOKEN}` + : undefined : TOKEN ? `token ${TOKEN}` : undefined; diff --git a/src/install-python.ts b/src/install-python.ts index 7aee61d5..44e9fa3b 100644 --- a/src/install-python.ts +++ b/src/install-python.ts @@ -8,7 +8,9 @@ import {IS_WINDOWS, IS_LINUX, isGhes} from './utils'; const TOKEN = core.getInput('token'); const GHES_TOKEN = core.getInput('ghes_token'); const AUTH = isGhes() - ? `token ${GHES_TOKEN}` + ? GHES_TOKEN + ? `token ${GHES_TOKEN}` + : undefined : TOKEN ? `token ${TOKEN}` : undefined;