MCPcopy Create free account
hub / github.com/Azure/static-web-apps-cli / runCommand

Function runCommand

src/core/utils/command.ts:4–15  ·  view source on GitHub ↗
(command: string, cwd?: string)

Source from the content-addressed store, hash-verified

2import { execFileSync, execSync } from "child_process";
3
4export function runCommand(command: string, cwd?: string) {
5 execSync(command, {
6 stdio: "inherit",
7 cwd: cwd ?? process.cwd(),
8 // Set CI to avoid extra NPM logs and potentially unwanted interactive modes
9 env: {
10 ...process.env,
11 // Internal flag to avoid duplicating user messages
12 SWA_CLI_INTERNAL_COMMAND: "1",
13 },
14 });
15}
16
17export function execFileCommand(command: string, cwd?: string, args?: string[]) {
18 const child = execFileSync(command, args, {

Callers 1

swaMagicFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…