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
+4 -2
View File
@@ -125,10 +125,11 @@ const buildGitEnv = async () => {
const createGit = async (directory) => {
const env = await buildGitEnv();
const spawnOptions = { windowsHide: true };
if (!directory) {
return simpleGit({ env });
return simpleGit({ env, spawnOptions });
}
return simpleGit({ baseDir: normalizeDirectoryPath(directory), env });
return simpleGit({ baseDir: normalizeDirectoryPath(directory), env, spawnOptions });
};
const normalizeDirectoryPath = (value) => {
@@ -415,6 +416,7 @@ const runGitCommand = async (cwd, args) => {
const { stdout, stderr } = await execFileAsync('git', args, {
cwd,
env: await buildGitEnv(),
windowsHide: true,
maxBuffer: 20 * 1024 * 1024,
});
return {