MCPcopy Index your code
hub / github.com/devcontainers/cli / shellExec

Function shellExec

src/test/testUtils.ts:42–52  ·  view source on GitHub ↗
(command: string, options: cp.ExecOptionsWithStringEncoding = {}, suppressOutput: boolean = false, doNotThrow: boolean = false)

Source from the content-addressed store, hash-verified

40}
41
42export function shellExec(command: string, options: cp.ExecOptionsWithStringEncoding = {}, suppressOutput: boolean = false, doNotThrow: boolean = false): Promise<ExecResult> {
43 return new Promise<ExecResult>((resolve, reject) => {
44 cp.exec(command, options, (error, stdout, stderr) => {
45 if (!suppressOutput) {
46 console.log(stdout);
47 console.error(stderr);
48 }
49 ((error && !doNotThrow) ? reject : resolve)({ error, stdout, stderr });
50 });
51 });
52}
53
54export interface BufferExecResult {
55 stdout: Buffer;

Callers 15

cli.podman.test.tsFile · 0.90
updateUID.test.tsFile · 0.90
cli.build.test.tsFile · 0.90
describeTests1Function · 0.90
describeTests2Function · 0.90
cli.set-up.test.tsFile · 0.90
cli.test.tsFile · 0.90
dotfiles.test.tsFile · 0.90
cli.up.test.tsFile · 0.90

Calls 1

execMethod · 0.65

Tested by 4

cleanupFunction · 0.72
isolateFixtureFunction · 0.72
generateAuthFolderFunction · 0.72