MCPcopy Index your code
hub / github.com/zenstackhq/zenstack / execPackage

Function execPackage

packages/cli/src/utils/exec-utils.ts:21–27  ·  view source on GitHub ↗
(
    cmd: string,
    options?: Omit<ExecSyncOptions, 'env'> & { env?: Record<string, string> },
)

Source from the content-addressed store, hash-verified

19 * Utility for running package commands through npx/bunx
20 */
21export function execPackage(
22 cmd: string,
23 options?: Omit<ExecSyncOptions, 'env'> & { env?: Record<string, string> },
24): void {
25 const packageManager = process?.versions?.['bun'] ? 'bunx' : 'npx';
26 execSync(`${packageManager} ${cmd}`, options);
27}
28
29/**
30 * Utility for running prisma commands

Callers 1

execPrismaFunction · 0.85

Calls 1

execSyncFunction · 0.85

Tested by

no test coverage detected