fix fs helper git test

This commit is contained in:
Conor Sloan
2024-04-15 13:56:23 +01:00
parent 17c0582657
commit 881fd1c540
+7 -1
View File
@@ -223,8 +223,14 @@ describe('ensureCorrectShaCheckedOut', () => {
beforeEach(() => {
dir = fsHelper.createTempDir(tmpFileDir, 'subdir')
// Set up a git repository with two commits
// Set up a git repository
execSync('git init', { cwd: dir })
// Set user and email in this git repo (not globally)
execSync('git config user.email monalisa@github.com', { cwd: dir })
execSync('git config user.name Mona', { cwd: dir })
// Add two commits
execSync('git commit --allow-empty -m "test"', { cwd: dir })
execSync('git commit --allow-empty -m "test"', { cwd: dir })