From 41bede4c7839a9fbc63c2a552e766c02771f6b8c Mon Sep 17 00:00:00 2001 From: Jinwoo-H Date: Tue, 11 Aug 2026 10:34:05 -0400 Subject: [PATCH] test(skills): use portable git config fixtures --- src/main/skills/skill-git-tree-identity.test.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/skills/skill-git-tree-identity.test.ts b/src/main/skills/skill-git-tree-identity.test.ts index 1761686e8db..9cb97e36f11 100644 --- a/src/main/skills/skill-git-tree-identity.test.ts +++ b/src/main/skills/skill-git-tree-identity.test.ts @@ -1,6 +1,6 @@ import { execFileSync } from 'node:child_process' import { chmod, mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises' -import { devNull, tmpdir } from 'node:os' +import { tmpdir } from 'node:os' import { join, resolve } from 'node:path' import { afterEach, describe, expect, it } from 'vitest' import type { SkillBundleManifest } from '../../shared/skill-freshness' @@ -50,7 +50,14 @@ describe('observed skill git tree identity', () => { await chmod(join(work, 'nested', 'deep', 'tool.sh'), 0o755) await writeFile(join(work, 'blob.bin'), Buffer.from([0, 1, 2, 253, 254, 255])) - const env = { ...process.env, GIT_CONFIG_GLOBAL: devNull, GIT_CONFIG_SYSTEM: devNull } + const globalConfig = join(base, 'global.gitconfig') + const systemConfig = join(base, 'system.gitconfig') + await Promise.all([writeFile(globalConfig, ''), writeFile(systemConfig, '')]) + const env = { + ...process.env, + GIT_CONFIG_GLOBAL: globalConfig, + GIT_CONFIG_SYSTEM: systemConfig + } execFileSync('git', ['init', '--quiet', repoShell], { env }) const gitDirArgs = ['--git-dir', join(repoShell, '.git'), '--work-tree', work] execFileSync('git', [...gitDirArgs, '-c', 'core.autocrlf=false', 'add', '-A'], {