fix(web): hide daemon/git console windows on Windows (#653)

This commit is contained in:
Sergio
2026-03-13 11:13:36 +02:00
committed by GitHub
parent 9fb7c90dbd
commit 875491c438
3 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -564,6 +564,7 @@ const searchFilesystemFiles = async (rootPath, options) => {
const result = await new Promise((resolve) => {
const child = spawn('git', ['check-ignore', '--', ...pathsToCheck], {
cwd: dir,
windowsHide: true,
stdio: ['ignore', 'pipe', 'pipe'],
});
@@ -1135,7 +1136,7 @@ const buildTemplateVariables = async (payload, sessionId) => {
if (worktreeDir) {
try {
const { simpleGit } = await import('simple-git');
const git = simpleGit(worktreeDir);
const git = simpleGit({ baseDir: worktreeDir, spawnOptions: { windowsHide: true } });
branch = await Promise.race([
git.revparse(['--abbrev-ref', 'HEAD']),
new Promise((_, reject) => setTimeout(() => reject(new Error('git timeout')), 3000)),
@@ -12950,6 +12951,7 @@ async function main(options = {}) {
const result = await new Promise((resolve) => {
const child = spawn('git', ['check-ignore', '--', ...pathsToCheck], {
cwd: resolvedPath,
windowsHide: true,
stdio: ['ignore', 'pipe', 'pipe'],
});