1 Commits

Author SHA1 Message Date
Fedor Dikarev
98b2971c0d Merge 087884b3d2 into 327cd5a69d 2025-01-09 11:00:08 +00:00

View File

@@ -51,12 +51,7 @@ export async function loginStandard(registry: string, username: string, password
}).then(res => {
if (res.stderr.length > 0 && res.exitCode != 0) {
let isRetriable: boolean
function isRetriableError(stderr: string): boolean {
const trimmedError = stderr.trim();
return trimmedError.endsWith("502 Bad Gateway") || trimmedError.includes("408");
}
isRetriable = isRetriableError(res.stderr);
isRetriable = res.stderr.trim().endsWith("502 Bad Gateway")
if (!isRetriable || (attempt >= attempts) {
throw new Error(res.stderr.trim());
}