@rpcbase/cli 0.21.0 → 0.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/cli",
3
- "version": "0.21.0",
3
+ "version": "0.23.0",
4
4
  "license": "SSPL-1.0",
5
5
  "bin": {
6
6
  "rb": "./bin.js"
@@ -3,15 +3,14 @@ const {execSync} = require("child_process")
3
3
  const os = require("os")
4
4
  const colors = require("picocolors")
5
5
 
6
- const {FORCE_DOCKER} = process.env
6
+ const {CONTAINER_MODE} = process.env
7
7
 
8
8
  const docker_runtime_check = () => {
9
9
  // skip check on osx except when forcing docker
10
- if (os.platform() === "darwin" && !FORCE_DOCKER) {
10
+ if (os.platform() === "darwin" && CONTAINER_MODE !== "docker") {
11
11
  return
12
12
  }
13
13
 
14
-
15
14
  try {
16
15
  execSync("docker version -f json")
17
16
  } catch (err) {
@@ -7,6 +7,8 @@ const exit_with_message = require("./exit_with_message")
7
7
 
8
8
  const {CONTAINER_MODE} = process.env
9
9
 
10
+ if (!["docker", "native"].includes(CONTAINER_MODE.trim()))
11
+ throw new Error("expected CONTAINER_MODE to be native|docker")
10
12
 
11
13
  // run type is client | server | both
12
14
  const get_run_configs = () => {