Files
VoiceStudio/scripts/desktop-dev-launch.mjs
Parker Hill 078bad8e0f fix(setup): repair fresh-clone desktop and ROCm source installs (#1664, #1665)
Fix fresh-clone desktop development by creating the required dist placeholder before Tauri starts, and make source setup install the selected CUDA or ROCm PyTorch stack consistently. Adds behavior-level cross-platform regression coverage.\n\nFixes #1664.\nFixes #1665.\n\nThanks @uberclokr for the contribution.
2026-08-27 18:33:55 +05:30

20 lines
537 B
JavaScript

import { spawnSync } from "node:child_process";
import { mkdirSync } from "node:fs";
import { join } from "node:path";
import process from "node:process";
/** Create Tauri's required dev resource before starting the compiler. */
export function launchTauriDev({
cwd = process.cwd(),
args = process.argv.slice(2),
env = process.env,
mkdir = mkdirSync,
spawn = spawnSync,
} = {}) {
mkdir(join(cwd, "dist"), { recursive: true });
return spawn("bun", ["run", "tauri", "dev", ...args], {
stdio: "inherit",
env,
});
}