fix(test runner): perform shallow clone check in config directory

This commit is contained in:
Simon Knott 2024-08-23 18:19:58 +02:00
parent 1b220c5289
commit 3c208aeeff
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -30,7 +30,7 @@ export async function detectChangedTestFiles(baseCommit: string, configDir: stri
const unknownRevision = error.output.some(line => line?.includes('unknown revision'));
if (unknownRevision) {
const isShallowClone = childProcess.execSync('git rev-parse --is-shallow-repository', { encoding: 'utf-8', stdio: 'pipe' }).trim() === 'true';
const isShallowClone = childProcess.execSync('git rev-parse --is-shallow-repository', { encoding: 'utf-8', stdio: 'pipe', cwd: configDir }).trim() === 'true';
if (isShallowClone) {
throw new Error([
`The repository is a shallow clone and does not have '${baseCommit}' available locally.`,