import { exec } from "child_process"; const { spawn } = require("child_process"); export async function getUname(): Promise { return new Promise((resolve, reject) => { const proc = spawn("uname", ["-a"]); let output = ""; proc.stdout.on("data", (data) => { output += data.toString(); }); proc.stderr.on("data", (data) => { reject(data.toString()); }); proc.on("close", (code) => { if (code !== 0) { reject("it didnt work lol"); } else { resolve(output.trim()); } }); }); }