You've already forked docker-login
mirror of
https://gitea.com/docker/login-action.git
synced 2025-12-15 01:48:26 +00:00
fix: print non-empty stderr
Signed-off-by: eine <eine@users.noreply.github.com>
This commit is contained in:
9
dist/index.js
generated
vendored
9
dist/index.js
generated
vendored
@@ -242,8 +242,13 @@ function loginStandard(registry, username, password) {
|
|||||||
input: Buffer.from(password)
|
input: Buffer.from(password)
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0) {
|
||||||
throw new Error(res.stderr.trim());
|
if (res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
core.warning(res.stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
core.info(`Login Succeeded!`);
|
core.info(`Login Succeeded!`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -43,8 +43,12 @@ export async function loginStandard(registry: string, username: string, password
|
|||||||
input: Buffer.from(password)
|
input: Buffer.from(password)
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0) {
|
||||||
throw new Error(res.stderr.trim());
|
if (res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
|
} else {
|
||||||
|
core.warning(res.stderr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
core.info(`Login Succeeded!`);
|
core.info(`Login Succeeded!`);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user