Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed odio dui. Aenean lacinia bibendum nulla sed consectetur. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.
Key Improvements
Usability: A more intuitive interface makes it easy to apply filters and refine your search.
code-snippet-name
1function run(cmd, params, cwd = process.cwd()) {
2 const child = childProcess.spawn(cmd, params, {
3 stdio: ["pipe", "inherit", "inherit"],
4 cwd,
5 });
6
7 return new Promise((resolve, reject) => {
8 child.on("close", () => {
9 resolve();
10 });
11 child.on("exit", (code) => {
12 if (code === 0) {
13 resolve();
14 } else {
15 reject(code);
16 }
17 });
18 child.on("error", () => {
19 reject();
20 });
21 });
22}