UNPKG
@interopio/cli
Version:
latest (4.2.0)
4.2.0
4.1.0
4.0.1
4.0.0
1.5.1
1.5.0
1.4.0
1.3.0
1.2.0
1.0.0
Interop.io CLI - a command line for creating Interop.io applications
interop.io
@interopio/cli
/
dist
/
utils
/
exec.js
11 lines
(10 loc)
•
305 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
import
*
as
child
from
"node:child_process"
;
export
const
runCommand
= (
command, options
) =>
new
Promise
(
(
resolve, reject
) =>
{ child.
exec
(command, options,
(
error, stdout
) =>
{
if
(error) {
reject
(error.
message
);
return
; }
resolve
(stdout); }); });