From 773ebe04c6d7120b546100a88610616808c7750c Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Thu, 16 Dec 2021 15:29:20 -0800 Subject: [PATCH] chore: follow-up to handling docker corner cases (#10981) --- .../src/grid/dockerGridFactory.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/packages/playwright-core/src/grid/dockerGridFactory.ts b/packages/playwright-core/src/grid/dockerGridFactory.ts index 2a7f6c4dda..b57b23af60 100644 --- a/packages/playwright-core/src/grid/dockerGridFactory.ts +++ b/packages/playwright-core/src/grid/dockerGridFactory.ts @@ -64,26 +64,9 @@ async function launchDockerGridAgent(agentId: string, gridURL: string): Promise< const pwImage = images.find(image => image.RepoTags?.includes(imageName)); if (!pwImage) { - const pwImages = images - .map(image => image.RepoTags?.find(tag => tag.startsWith('mcr.microsoft.com/playwright:'))) - .filter((tag): tag is string => typeof tag === 'string'); - - const usage = pwImages.length > 0 ? [ - ``, - `Available images:`, - ...pwImages.map(image => `- ${image}`), - ``, - `Use available images via PWTEST_IMAGE_NAME environment variable:`, - ` PWTEST_IMAGE_NAME=${pwImages[0]} playwright test`, - `` - ] : []; - - const pullPrefix = pwImages.length > 0 ? 'Alternatively, please' : 'Please'; - throw new Error(`\n` + utils.wrapInASCIIBox([ `Failed to find ${imageName} docker image.`, - ...usage, - `${pullPrefix} pull docker image with the following command:`, + `Please pull docker image with the following command:`, ``, ` npx playwright install docker-image`, ``,