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 21, 2021
1 parent 1cce165 commit 7171cfe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 7 additions & 2 deletions dist/index.js

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

8 changes: 6 additions & 2 deletions src/docker.ts
Expand Up @@ -43,8 +43,12 @@ export async function loginStandard(registry: string, username: string, password
input: Buffer.from(password)
})
.then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
throw new Error(res.stderr.trim());
if (res.stderr.length > 0) {
if (res.exitCode != 0) {
throw new Error(res.stderr.trim());
} else {
core.warning(res.stderr);
}
}
core.info(`Login Succeeded!`);
});
Expand Down

0 comments on commit 7171cfe

Please sign in to comment.