Skip to content

Commit

Permalink
fix: print non-empty stderr
Browse files Browse the repository at this point in the history
  • Loading branch information
eine committed Nov 4, 2020
1 parent ddf06e1 commit 64b160b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
});
Expand Down

0 comments on commit 64b160b

Please sign in to comment.