From 64b160b00a4af95b195fcbd87650e010f1f74b5e Mon Sep 17 00:00:00 2001 From: eine Date: Wed, 4 Nov 2020 19:17:53 +0100 Subject: [PATCH] fix: print non-empty stderr --- dist/index.js | 7 +++++-- src/docker.ts | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 8d45f5aa..791b7787 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3075,8 +3075,11 @@ function loginStandard(registry, username, password) { core.info(`🔑 Logging into DockerHub...`); } yield execm.exec('docker', loginArgs, true, password).then(res => { - if (res.stderr != '' && !res.success) { - throw new Error(res.stderr); + if (res.stderr != '') { + console.log(res.stderr); + if (!res.success) { + throw new Error(res.stderr); + } } core.info('🎉 Login Succeeded!'); }); diff --git a/src/docker.ts b/src/docker.ts index a5de9eab..80f76a7d 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -33,8 +33,11 @@ export async function loginStandard(registry: string, username: string, password core.info(`🔑 Logging into DockerHub...`); } await execm.exec('docker', loginArgs, true, password).then(res => { - if (res.stderr != '' && !res.success) { - throw new Error(res.stderr); + if (res.stderr != '') { + core.warning(res.stderr); + if (!res.success) { + throw new Error(res.stderr); + } } core.info('🎉 Login Succeeded!'); });