Refactor execSync and spawn calls to include windowsHide option for better compatibility on Windows environments.

This commit is contained in:
decolua
2026-04-14 11:48:59 +07:00
parent 04cdb75839
commit 1fa05eb2ab
8 changed files with 45 additions and 34 deletions
+2 -2
View File
@@ -103,7 +103,7 @@ export async function ensureCloudflared() {
await downloadFile(url, downloadDest);
if (isArchive) {
execSync(`tar -xzf "${downloadDest}" -C "${BIN_DIR}"`, { stdio: "pipe" });
execSync(`tar -xzf "${downloadDest}" -C "${BIN_DIR}"`, { stdio: "pipe", windowsHide: true });
fs.unlinkSync(downloadDest);
}
@@ -312,7 +312,7 @@ export function killCloudflared() {
// Kill any remaining cloudflared processes
try {
execSync("pkill -f cloudflared 2>/dev/null || true", { stdio: "ignore" });
execSync("pkill -f cloudflared 2>/dev/null || true", { stdio: "ignore", windowsHide: true });
} catch (e) { /* ignore */ }
}