mirror of
https://github.com/docker/login-action
synced 2024-11-25 06:21:41 +00:00
trim stderr for checking
Signed-off-by: Fedor Dikarev <fedor.dikarev@gmail.com>
This commit is contained in:
parent
8479e9040e
commit
162c32cf05
1 changed files with 1 additions and 1 deletions
|
@ -51,7 +51,7 @@ export async function loginStandard(registry: string, username: string, password
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
let isRetriable: boolean
|
let isRetriable: boolean
|
||||||
isRetriable = res.stderr.endsWith("502 Bad Gateway")
|
isRetriable = res.stderr.trim().endsWith("502 Bad Gateway")
|
||||||
if (!isRetriable || (attempt >= attempts) {
|
if (!isRetriable || (attempt >= attempts) {
|
||||||
throw new Error(res.stderr.trim());
|
throw new Error(res.stderr.trim());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue