Page MenuHomeSealhub

exec_async.ts
No OneTemporary

exec_async.ts

/* eslint-disable @typescript-eslint/restrict-template-expressions */
import { exec } from "child_process";
export const execAsync = (cmd: string) => {
return new Promise<void>((resolve, reject) => {
const process = exec(cmd);
console.log("EXECUTING", cmd);
process?.stdout?.on("data", (data) => {
console.log(`stdout: ${data}`);
});
process?.stderr?.on("data", (data) => {
console.log(`stdout: ${data}`);
});
process.on("exit", (code) => {
if (code == 0) {
resolve();
} else {
reject();
}
});
});
};

File Metadata

Mime Type
text/x-java
Expires
Fri, Jan 24, 16:50 (1 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
601467
Default Alt Text
exec_async.ts (547 B)

Event Timeline