@rpcbase/server 0.230.0 → 0.231.0
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/cli/check_args.js +12 -8
- package/package.json +1 -1
package/cli/check_args.js
CHANGED
|
@@ -5,16 +5,20 @@ const check_args = (args) => {
|
|
|
5
5
|
throw new Error("Did you mean --sessions?")
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
try {
|
|
9
|
+
const {npm_config_argv} = process.env
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if (!npm_config_argv) {
|
|
12
|
+
console.warn("no npm_config_argv skipping arg check")
|
|
13
|
+
return
|
|
14
|
+
}
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
const raw_args = JSON.parse(npm_config_argv).original
|
|
17
|
+
if (raw_args.indexOf("--no-session") > -1) {
|
|
18
|
+
throw new Error("Did you mean --no-sessions?")
|
|
19
|
+
}
|
|
20
|
+
} catch (err) {
|
|
21
|
+
console.log("ERROR CHECKING ARGS", raw_args)
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
return true
|