MCPcopy Create free account
hub / github.com/dfinity/orbit / commandExists

Function commandExists

cli/src/utils.ts:84–91  ·  view source on GitHub ↗
(command: string)

Source from the content-addressed store, hash-verified

82};
83
84export const commandExists = (command: string): boolean => {
85 try {
86 execSync(`command -v ${command}`, { stdio: 'ignore' });
87 return true;
88 } catch (error) {
89 return false;
90 }
91};
92
93export const assertCommandExists = (command: string): void => {
94 if (!commandExists(command)) {

Callers 1

assertCommandExistsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected