diff --git a/src/detection/git-branch.test.ts b/src/detection/git-branch.test.ts index 9f382a1..9f8cde2 100644 --- a/src/detection/git-branch.test.ts +++ b/src/detection/git-branch.test.ts @@ -24,13 +24,14 @@ describe('getGitBranch', () => { expect(mockExecFile).toHaveBeenCalledTimes(1); }); - it('passes cwd, timeout, and killSignal in options', async () => { + it('passes cwd, timeout, killSignal, and windowsHide in options', async () => { const mockExecFile = vi .fn() .mockImplementation((_file, _args, opts, callback) => { expect(opts.cwd).toBe('/my/project/dir'); expect(opts.timeout).toBe(5000); expect(opts.killSignal).toBe('SIGTERM'); + expect(opts.windowsHide).toBe(true); (callback as ExecFileCallback)(null, 'main\n', ''); return {} as ReturnType; }); diff --git a/src/detection/git-branch.ts b/src/detection/git-branch.ts index de7b7eb..eecb552 100644 --- a/src/detection/git-branch.ts +++ b/src/detection/git-branch.ts @@ -14,6 +14,7 @@ export async function getGitBranch( cwd: projectDir, timeout: GIT_TIMEOUT_MS, killSignal: 'SIGTERM', + windowsHide: true, }; execFn( 'git',