MCPcopy
hub / github.com/openai/codex-plugin-cc / runCommandChecked

Function runCommandChecked

plugins/codex/scripts/lib/process.mjs:27–36  ·  view source on GitHub ↗
(command, args = [], options = {})

Source from the content-addressed store, hash-verified

25}
26
27export function runCommandChecked(command, args = [], options = {}) {
28 const result = runCommand(command, args, options);
29 if (result.error) {
30 throw result.error;
31 }
32 if (result.status !== 0) {
33 throw new Error(formatCommandFailure(result));
34 }
35 return result;
36}
37
38export function binaryAvailable(command, versionArgs = ["--version"], options = {}) {
39 const result = runCommand(command, versionArgs, options);

Callers 1

gitCheckedFunction · 0.90

Calls 2

runCommandFunction · 0.85
formatCommandFailureFunction · 0.85

Tested by

no test coverage detected