UNPKG
@dotenv-run/cli
Version:
latest (1.3.6)
1.3.6
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0
0.5.0
0.4.1
0.4.0
0.3.0
0.2.0
0.1.1
cli to load environment variables with monorepo support
github.com/chihab/dotenv-run
@dotenv-run/cli
/
dist
/
run.js
12 lines
(11 loc)
•
326 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
spawn
from
"cross-spawn"
;
export
const
run
= (
cmd, args
) => {
spawn
(cmd, args, {
stdio
:
"inherit"
}).
on
(
"exit"
,
function
(
exitCode, signal
) {
if
(
typeof
exitCode ===
"number"
) { process.
exit
(exitCode); }
else
{ process.
kill
(process.
pid
, signal); } }); };