MCPcopy 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

7let cachedRuntime = null;
8
9function commandExists(cmd) {
10 try {
11 execSync(`${cmd} --version`, { stdio: 'ignore', shell: true });
12 return true;
13 } catch {
14 return false;
15 }
16}
17
18function wslCommandExists(cmd) {
19 try {

Callers 1

resolveRuntimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected