MCPcopy
hub / github.com/ionic-team/capacitor / runCommand

Function runCommand

cli/src/util/subprocess.ts:7–24  ·  view source on GitHub ↗
(
  command: string,
  args: readonly string[],
  options: RunCommandOptions = {},
)

Source from the content-addressed store, hash-verified

5}
6
7export async function runCommand(
8 command: string,
9 args: readonly string[],
10 options: RunCommandOptions = {},
11): Promise<string> {
12 const p = new Subprocess(command, args, options);
13
14 try {
15 return await p.output();
16 } catch (e) {
17 if (e instanceof SubprocessError) {
18 // old behavior of just throwing the stdout/stderr strings
19 throw e.output ? e.output : e.cause ? `${e.message} ${e.cause.toString()}` : e.code ? e.code : 'Unknown error';
20 }
21
22 throw e;
23 }
24}
25
26export async function getCommandOutput(
27 command: string,

Callers 15

installPlatformFunction · 0.90
makeAppDirFunction · 0.90
checkJDKMajorVersionFunction · 0.90
runAndroidFunction · 0.90
gradleSyncFunction · 0.90
buildAndroidFunction · 0.90
signWithApkSignerFunction · 0.90
signWithJarSignerFunction · 0.90
checkBundlerFunction · 0.90
updatePodfileFunction · 0.90
runIOSFunction · 0.90
buildiOSFunction · 0.90

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected