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.
20 lines
537 B
JavaScript
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,
|
|
});
|
|
}
|