MCPcopy Create free account
hub / github.com/6pac/SlickGrid / execAsyncPiped

Function execAsyncPiped

scripts/child-process.mjs:42–57  ·  view source on GitHub ↗
(command, execArgs, execOpts, cmdDryRun)

Source from the content-addressed store, hash-verified

40 * @param {Boolean} [cmdDryRun]
41 */
42export function execAsyncPiped(command, execArgs, execOpts, cmdDryRun) {
43 if (cmdDryRun) {
44 console.log(`[DRY RUN] Would execute: ${command} ${execArgs.join(' ')}`);
45 return Promise.resolve({ stdout: '', stderr: '' });
46 }
47
48 const options = {
49 nodeOptions: {
50 ...execOpts,
51 stdio: ['pipe'],
52 }
53 };
54 const spawned = spawnProcess(command, execArgs, options, cmdDryRun);
55
56 return cmdDryRun ? Promise.resolve({ stdout: '', stderr: '' }) : wrapError(spawned);
57}
58
59/**
60 * Execute a command synchronously.

Callers 11

publishPackageFunction · 0.90
syncLockFileFunction · 0.90
gitAddFunction · 0.90
gitCommitFunction · 0.90
gitCurrentBranchNameFunction · 0.90
gitTagFunction · 0.90
gitTagPushRemoteFunction · 0.90
gitPushToCurrentBranchFunction · 0.90
gitPushUpstreamBranchFunction · 0.90
hasUncommittedChangesFunction · 0.90
cleanPublishPackageFunction · 0.90

Calls 2

spawnProcessFunction · 0.85
wrapErrorFunction · 0.85

Tested by

no test coverage detected