MCPcopy Index your code
hub / github.com/glideapps/quicktype / exec

Function exec

test/utils.ts:40–58  ·  view source on GitHub ↗
(
  s: string,
  opts: { silent: boolean } = { silent: !DEBUG },
  cb?: any
)

Source from the content-addressed store, hash-verified

38}
39
40export function exec(
41 s: string,
42 opts: { silent: boolean } = { silent: !DEBUG },
43 cb?: any
44): { stdout: string; code: number } {
45 debug(s);
46 let result = shell.exec(s, opts, cb);
47
48 if (result.code !== 0) {
49 console.error(result.stdout);
50 console.error(result.stderr);
51 failWith("Command failed", {
52 command: s,
53 code: result.code
54 });
55 }
56
57 return result;
58}
59
60async function time<T>(work: () => Promise<T>): Promise<[T, number]> {
61 let start = +new Date();

Callers 7

mainFunction · 0.90
qtFunction · 0.90
setupFunction · 0.90
testMethod · 0.90
testMethod · 0.90
testMethod · 0.90
compareJsonFileToJsonFunction · 0.70

Calls 2

debugFunction · 0.85
failWithFunction · 0.85

Tested by 3

testMethod · 0.72
testMethod · 0.72
testMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…