From 7e36086f368f03a37df27d38609ef98df42adb15 Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Thu, 19 Dec 2019 14:20:17 -0800 Subject: [PATCH] Pass undefined when empty --- dist/index.js | 6 +++--- src/setup-java.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index be71c59..4fb758e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3878,9 +3878,9 @@ function run() { yield installer.getJava(version, arch, jdkFile, javaPackage); const matchersPath = path.join(__dirname, '..', '.github'); console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`); - const id = core.getInput('server-id', { required: false }); - const username = core.getInput('server-username', { required: false }); - const password = core.getInput('server-password', { required: false }); + const id = core.getInput('server-id', { required: false }) || undefined; + const username = core.getInput('server-username', { required: false }) || undefined; + const password = core.getInput('server-password', { required: false }) || undefined; yield auth.configAuthentication(id, username, password); } catch (error) { diff --git a/src/setup-java.ts b/src/setup-java.ts index a50ff55..7614f03 100644 --- a/src/setup-java.ts +++ b/src/setup-java.ts @@ -18,9 +18,9 @@ async function run() { const matchersPath = path.join(__dirname, '..', '.github'); console.log(`##[add-matcher]${path.join(matchersPath, 'java.json')}`); - const id = core.getInput('server-id', {required: false}); - const username = core.getInput('server-username', {required: false}); - const password = core.getInput('server-password', {required: false}); + const id = core.getInput('server-id', {required: false}) || undefined; + const username = core.getInput('server-username', {required: false}) || undefined; + const password = core.getInput('server-password', {required: false}) || undefined; await auth.configAuthentication(id, username, password); } catch (error) {