MCPcopy
hub / github.com/obytes/react-native-template-obytes / execShellCommand

Function execShellCommand

cli/utils.js:5–15  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

3const { consola } = require('consola');
4
5const execShellCommand = (cmd) => {
6 return new Promise((resolve, reject) => {
7 exec(cmd, (error, stdout, stderr) => {
8 if (error) {
9 console.warn(error);
10 reject(error);
11 }
12 resolve(stdout ? stdout : stderr);
13 });
14 });
15};
16
17const runCommand = async (
18 command,

Callers 2

initGitFunction · 0.85
runCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected