mirror of
https://git.coastit.co.za/caitlin/CRM_ENVR.git
synced 2026-07-10 11:15:43 +02:00
Update on auto setup
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
// ── Python Runner ──────────────────────────────────────────────────
|
||||
// Detects the system's Python executable (python vs python3) and runs
|
||||
// a given script with arguments. Used by the dev:browser-use npm script.
|
||||
// Avoids shell:true — spawns Python directly with its full path.
|
||||
// Cross-platform: uses where (Windows) or which (Linux/Mac).
|
||||
|
||||
import { execSync, spawn } from "node:child_process"
|
||||
import { platform } from "node:os"
|
||||
|
||||
@@ -23,5 +29,6 @@ if (!script) {
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
// Spawn Python with inherited stdio so the script's output is visible
|
||||
const proc = spawn(PYTHON, [script, ...args], { stdio: "inherit" })
|
||||
proc.on("exit", (code) => process.exit(code ?? 1))
|
||||
|
||||
Reference in New Issue
Block a user