MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / run

Function run

scripts/experimental/swiftui-preview.mjs:1420–1433  ·  view source on GitHub ↗
(command, args, options = {})

Source from the content-addressed store, hash-verified

1418}
1419
1420function run(command, args, options = {}) {
1421 const result = spawnSync(command, args, {
1422 cwd: process.cwd(),
1423 encoding: "utf8",
1424 stdio: options.capture ? "pipe" : "inherit",
1425 });
1426 if (result.status !== 0 && !options.allowFailure) {
1427 const details = options.capture
1428 ? `\n${result.stderr || result.stdout}`
1429 : "";
1430 throw new Error(`${command} ${args.join(" ")} failed.${details}`);
1431 }
1432 return result;
1433}
1434
1435function runText(command, args) {
1436 const result = run(command, args, { capture: true });

Callers 6

buildHostAppFunction · 0.70
installAndLaunchHostFunction · 0.70
reloadPreviewFunction · 0.70
resolveXcodeContextFunction · 0.70
runTextFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected