Files
js/scripts/hotlink/execute.mjs
T
d01b135d26 Connect Wallet v2 (#584)
Co-authored-by: ikethirdweb <[email protected]>
Co-authored-by: Joaquim Verges <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2023-03-11 00:03:44 +00:00

23 lines
381 B
JavaScript

import { exec } from "child_process";
/**
*
* @param {string[]} commands
* @returns
*/
export const execute = (commands) => {
return new Promise((res) => {
exec(commands.join("\n"), (err, stdout, stderr) => {
if (err) {
throw err;
}
if (stderr) {
console.error(stderr);
console.log("\n");
}
res();
});
});
};