Refactor execSync and spawn calls to include windowsHide option for better compatibility on Windows environments.
This commit is contained in:
1 parent
04cdb75839
commit
1fa05eb2ab
8 files changed
+45
-34
No files matched your search
@@ -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 */ }
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user