We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a677711 commit da45d34Copy full SHA for da45d34
Source/Function/Exec.ts
@@ -1,22 +0,0 @@
1
-import type Interface from "../Interface/Exec.js";
2
-
3
-/**
4
- * @module Exec
5
- *
6
- */
7
-export default (async (
8
- ...[Command, Echo = async (Return) => console.log(Return)]
9
-) => {
10
- try {
11
- const { stdout, stderr } = (await import("child_process")).exec(
12
- Command,
13
- );
14
15
- if (typeof Echo === "function") {
16
- stdout?.on("data", async (Data) => await Echo(Data.trim()));
17
- stderr?.on("data", async (Data) => await Echo(Data.trim(), true));
18
- }
19
- } catch (_Error) {
20
- console.log(_Error);
21
22
-}) satisfies Interface as Interface;
0 commit comments