Add bulk wipe
This commit is contained in:
parent
4721569c5d
commit
b24a5bb612
6 changed files with 119 additions and 2 deletions
21
gum.js
Normal file
21
gum.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue