MCPcopy
hub / github.com/microsoft/vscode-js-debug / runCommand

Function runCommand

gulpfile.js:481–491  ·  view source on GitHub ↗

* Run a command in the terminal using exec, and wrap it in a promise * @param {string} cmd The command line command + args to execute * @param {ExecOptions} options, see here for options: https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_child_process_exec_command_options_c

(cmd, options)

Source from the content-addressed store, hash-verified

479 * @param {ExecOptions} options, see here for options: https://nodejs.org/docs/latest-v10.x/api/child_process.html#child_process_child_process_exec_command_options_callback
480 */
481function runCommand(cmd, options) {
482 return new Promise((resolve, reject) => {
483 let execError = undefined;
484 try {
485 execSync(cmd, { stdio: 'inherit', ...options });
486 } catch (err) {
487 reject(err);
488 }
489 resolve();
490 });
491}

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.85

Tested by

no test coverage detected