From 162c32cf05fa72e5fa5a2d788bb4c7e3914aa19e Mon Sep 17 00:00:00 2001 From: Fedor Dikarev Date: Tue, 29 Oct 2024 22:06:33 +0100 Subject: [PATCH] trim stderr for checking Signed-off-by: Fedor Dikarev --- src/docker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker.ts b/src/docker.ts index 45d64a1..632cd6a 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -51,7 +51,7 @@ export async function loginStandard(registry: string, username: string, password }).then(res => { if (res.stderr.length > 0 && res.exitCode != 0) { let isRetriable: boolean - isRetriable = res.stderr.endsWith("502 Bad Gateway") + isRetriable = res.stderr.trim().endsWith("502 Bad Gateway") if (!isRetriable || (attempt >= attempts) { throw new Error(res.stderr.trim()); }