@infosupport/huddle-cli 0.0.0-experiment-58.18.1 → 0.0.0-experiment-58.19.1
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/dist/runtime.js +6 -3
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -12,8 +12,11 @@ function commandOutput(cmd) {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
function isAvailable(runtime) {
|
|
15
|
-
// 'info' only succeeds if the daemon/machine is actually reachable.
|
|
16
|
-
|
|
15
|
+
// 'info' only succeeds if the daemon/machine is actually reachable. wslc has
|
|
16
|
+
// no 'info' subcommand at all (it exits with "Unrecognized command"), so use
|
|
17
|
+
// 'list' there instead — it equally requires a reachable daemon to succeed.
|
|
18
|
+
const probe = runtime === 'wslc' ? 'list' : 'info';
|
|
19
|
+
return commandOutput(`${runtime} ${probe}`) !== undefined;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Bepaalt de ECHTE engine achter een commando, of undefined als de engine niet
|
|
@@ -28,7 +31,7 @@ function detectEngine(command) {
|
|
|
28
31
|
return 'podman';
|
|
29
32
|
}
|
|
30
33
|
if (isAvailable(command))
|
|
31
|
-
return
|
|
34
|
+
return command;
|
|
32
35
|
return undefined;
|
|
33
36
|
}
|
|
34
37
|
function podmanSocketPath() {
|
package/package.json
CHANGED