Skip to content

Commit 414cc9b

Browse files
authored
cherry-pick(#13487): do not require --force flag when installing channel on CI (#13488)
SHA 0f66381
1 parent fe8dad0 commit 414cc9b

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

.github/workflows/tests_secondary.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
env:
235235
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
236236
- run: npm run build
237-
- run: npx playwright install --with-deps --force chrome
237+
- run: npx playwright install --with-deps chrome
238238
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
239239
env:
240240
PWTEST_CHANNEL: chrome
@@ -259,7 +259,7 @@ jobs:
259259
env:
260260
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
261261
- run: npm run build
262-
- run: npx playwright install --with-deps --force chrome
262+
- run: npx playwright install --with-deps chrome
263263
- run: npm run ctest
264264
shell: bash
265265
env:
@@ -286,7 +286,7 @@ jobs:
286286
env:
287287
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
288288
- run: npm run build
289-
- run: npx playwright install --with-deps --force chrome
289+
- run: npx playwright install --with-deps chrome
290290
- run: npm run ctest
291291
env:
292292
PWTEST_CHANNEL: chrome
@@ -388,7 +388,7 @@ jobs:
388388
env:
389389
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
390390
- run: npm run build
391-
- run: npx playwright install --with-deps --force msedge
391+
- run: npx playwright install --with-deps msedge
392392
- run: npm run ctest
393393
env:
394394
PWTEST_CHANNEL: msedge
@@ -414,7 +414,7 @@ jobs:
414414
env:
415415
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
416416
- run: npm run build
417-
- run: npx playwright install --with-deps --force msedge
417+
- run: npx playwright install --with-deps msedge
418418
- run: npm run ctest
419419
shell: bash
420420
env:
@@ -438,7 +438,7 @@ jobs:
438438
env:
439439
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
440440
- run: npm run build
441-
- run: npx playwright install --with-deps --force msedge
441+
- run: npx playwright install --with-deps msedge
442442
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
443443
env:
444444
PWTEST_CHANNEL: msedge
@@ -463,7 +463,7 @@ jobs:
463463
env:
464464
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
465465
- run: npm run build
466-
- run: npx playwright install --with-deps --force msedge-beta
466+
- run: npx playwright install --with-deps msedge-beta
467467
- run: npm run ctest
468468
env:
469469
PWTEST_CHANNEL: msedge-beta
@@ -488,7 +488,7 @@ jobs:
488488
env:
489489
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
490490
- run: npm run build
491-
- run: npx playwright install --with-deps --force msedge-beta
491+
- run: npx playwright install --with-deps msedge-beta
492492
- run: npm run ctest
493493
shell: bash
494494
env:
@@ -512,7 +512,7 @@ jobs:
512512
env:
513513
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
514514
- run: npm run build
515-
- run: npx playwright install --with-deps --force msedge-beta
515+
- run: npx playwright install --with-deps msedge-beta
516516
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
517517
env:
518518
PWTEST_CHANNEL: msedge-beta
@@ -537,7 +537,7 @@ jobs:
537537
env:
538538
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
539539
- run: npm run build
540-
- run: npx playwright install --with-deps --force msedge-dev
540+
- run: npx playwright install --with-deps msedge-dev
541541
- run: npm run ctest
542542
env:
543543
PWTEST_CHANNEL: msedge-dev
@@ -562,7 +562,7 @@ jobs:
562562
env:
563563
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
564564
- run: npm run build
565-
- run: npx playwright install --with-deps --force msedge-dev
565+
- run: npx playwright install --with-deps msedge-dev
566566
- run: npm run ctest
567567
shell: bash
568568
env:
@@ -586,7 +586,7 @@ jobs:
586586
env:
587587
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
588588
- run: npm run build
589-
- run: npx playwright install --with-deps --force msedge-dev
589+
- run: npx playwright install --with-deps msedge-dev
590590
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
591591
env:
592592
PWTEST_CHANNEL: msedge-dev
@@ -611,7 +611,7 @@ jobs:
611611
env:
612612
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
613613
- run: npm run build
614-
- run: npx playwright install --with-deps --force chrome-beta
614+
- run: npx playwright install --with-deps chrome-beta
615615
- run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- npm run ctest
616616
env:
617617
PWTEST_CHANNEL: chrome-beta
@@ -636,7 +636,7 @@ jobs:
636636
env:
637637
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
638638
- run: npm run build
639-
- run: npx playwright install --with-deps --force chrome-beta
639+
- run: npx playwright install --with-deps chrome-beta
640640
- run: npm run ctest
641641
shell: bash
642642
env:
@@ -663,7 +663,7 @@ jobs:
663663
env:
664664
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
665665
- run: npm run build
666-
- run: npx playwright install --with-deps --force chrome-beta
666+
- run: npx playwright install --with-deps chrome-beta
667667
- run: npm run ctest
668668
env:
669669
PWTEST_CHANNEL: chrome-beta

packages/playwright-core/src/server/registry/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ export class Registry {
600600
throw new Error(`ERROR: Playwright does not support installing ${executable.name}`);
601601

602602
const { langName } = getClientLanguage();
603-
if (!executable._isHermeticInstallation && !forceReinstall && executable.executablePath(langName)) {
603+
if (!getAsBooleanFromENV('CI') && !executable._isHermeticInstallation && !forceReinstall && executable.executablePath(langName)) {
604604
const command = buildPlaywrightCLICommand(langName, 'install --force ' + executable.name);
605605
throw new Error('\n' + wrapInASCIIBox([
606606
`ATTENTION: "${executable.name}" is already installed on the system!`,

0 commit comments

Comments
 (0)