ipadtool/gum.js
2025-06-09 13:32:53 -04:00

21 lines
426 B
JavaScript

import { spawn } from "child_process";
export function gum(...args) {
return new Promise((res, rej) => {
const gum = spawn("gum", args, {
env: { ...process.env, TERM: "xterm-256color" },
});
gum.stderr.pipe(process.stderr);
gum.stdout.on("data", (data) => {
res(data.toString());
});
gum.on("exit", res);
});
}
export function info(msg) {
return gum("log", "-l", "info", msg);
}