@karmaniverous/get-dotenv 2.3.2 → 2.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/getdotenv/index.js +5 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ dotenv files. You can:
|
|
|
92
92
|
-l, --log log extracted variables (default: false)
|
|
93
93
|
-t, --dotenv-token <string> token indicating a dotenv file (default: '.env')
|
|
94
94
|
-i, --private-token <string> token indicating private variables (default: 'local')
|
|
95
|
-
-q, --
|
|
95
|
+
-q, --quit-on-error terminate sequential process on error (default: false)
|
|
96
96
|
-h, --help display help for command
|
|
97
97
|
```
|
|
98
98
|
|
package/bin/getdotenv/index.js
CHANGED
|
@@ -85,8 +85,8 @@ program
|
|
|
85
85
|
"token indicating private variables (default: 'local')"
|
|
86
86
|
)
|
|
87
87
|
.option(
|
|
88
|
-
'-q, --
|
|
89
|
-
'
|
|
88
|
+
'-q, --quit-on-error',
|
|
89
|
+
'terminate sequential process on error (default: false)'
|
|
90
90
|
);
|
|
91
91
|
|
|
92
92
|
// Parse CLI options from command line.
|
|
@@ -105,7 +105,7 @@ const {
|
|
|
105
105
|
outputPath,
|
|
106
106
|
paths,
|
|
107
107
|
privateToken,
|
|
108
|
-
|
|
108
|
+
quitOnError,
|
|
109
109
|
} = program.opts();
|
|
110
110
|
|
|
111
111
|
if (command && program.args.length) program.error('command specified twice');
|
|
@@ -136,13 +136,10 @@ if (command || program.args.length) {
|
|
|
136
136
|
.map((c) => parseArgsStringToArgv(c));
|
|
137
137
|
|
|
138
138
|
for (const argv of argvs) {
|
|
139
|
-
const {
|
|
139
|
+
const { status } = spawn.sync(argv[0], argv.slice(1), {
|
|
140
140
|
stdio: 'inherit',
|
|
141
141
|
});
|
|
142
142
|
|
|
143
|
-
if (
|
|
144
|
-
if (error) throw error;
|
|
145
|
-
if (status) throw new Error(`exited with code ${status}`);
|
|
146
|
-
}
|
|
143
|
+
if (status && quitOnError) process.exit(status);
|
|
147
144
|
}
|
|
148
145
|
}
|