mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 15:41:15 +00:00
fix(desktop): inline git identity in worktree tracking test for CI
CI runners have no global git identity. The remote repo seed commit needs inline -c user.email/user.name flags, matching the pattern already used by ensureGitRepo.
This commit is contained in:
parent
678b86df1c
commit
1d48863b85
1 changed files with 3 additions and 2 deletions
|
|
@ -271,9 +271,10 @@ test('addWorktree: base origin/main does not set up upstream tracking', async ()
|
|||
const git = (...args) => execFileSync('git', args, { cwd: cloneDir }).toString().trim()
|
||||
|
||||
try {
|
||||
// Seed the remote with a commit on main.
|
||||
// Seed the remote with a commit on main. Inline identity so it works
|
||||
// on CI runners with no global git config.
|
||||
execFileSync('git', ['init', '-b', 'main', remoteDir])
|
||||
execFileSync('git', ['-C', remoteDir, 'commit', '--allow-empty', '-m', 'root'])
|
||||
execFileSync('git', ['-C', remoteDir, '-c', 'user.email=hermes@localhost', '-c', 'user.name=Hermes', 'commit', '--allow-empty', '-m', 'root'])
|
||||
|
||||
// Clone so origin/main exists as a remote-tracking ref.
|
||||
execFileSync('git', ['clone', remoteDir, cloneDir])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue