Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/TechJeeper/Printventory
/ wslCommandExists
Function
wslCommandExists
scripts/container-runtime.js:18–25 ·
view source on GitHub ↗
(cmd)
Source
from the content-addressed store, hash-verified
16
}
17
18
function
wslCommandExists(cmd) {
19
try {
20
execSync(`wsl which ${cmd}`, { stdio:
'ignore'
, shell: true });
21
return
true;
22
} catch {
23
return
false;
24
}
25
}
26
27
function
resolveRuntime(name) {
28
if
(commandExists(name)) {
Callers
1
resolveRuntime
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected