Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TechJeeper/Printventory
/ commandExists
Function
commandExists
scripts/container-runtime.js:9–16 ·
view source on GitHub ↗
(cmd)
Source
from the content-addressed store, hash-verified
7
let
cachedRuntime = null;
8
9
function
commandExists(cmd) {
10
try {
11
execSync(`${cmd} --version`, { stdio:
'ignore'
, shell: true });
12
return
true;
13
} catch {
14
return
false;
15
}
16
}
17
18
function
wslCommandExists(cmd) {
19
try {
Callers
1
resolveRuntime
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected