fix: don't use git status for workspace consistency (#29224)

Motivation: We verify this already in the
[infra.yml](https://github.com/microsoft/playwright/blob/main/.github/workflows/infra.yml).
Doing it in `workspace.js` breaks the canary builds, because it has
stray files (package.json / package-lock.json).
This commit is contained in:
Max Schmitt 2024-01-29 20:13:54 +01:00 committed by GitHub
parent 1db4e2effb
commit f4b8ff9c95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -236,10 +236,6 @@ async function parseCLI() {
const hasChanges = await workspace.ensureConsistent();
if (hasChanges)
die(`\n ERROR: workspace is inconsistent! Run '//utils/workspace.js --ensure-consistent' and commit changes!`);
// check that there are no dirty git files.
const gitStatus = child_process.execSync('git status --porcelain').toString();
if (gitStatus.trim())
die(`\n ERROR: some git files are dirty, run build and commit changes!\n${gitStatus}`);
// Ensure lockfileVersion is 3
const packageLock = require(ROOT_PATH + '/package-lock.json');
if (packageLock.lockfileVersion !== 3)