MCPcopy Create free account
hub / github.com/Gan-Xing/CodexBridge / runPowerShellScript

Function runPowerShellScript

packages/codex-native-api/src/daemon_manager.ts:1037–1041  ·  view source on GitHub ↗
(script: string)

Source from the content-addressed store, hash-verified

1035}
1036
1037async function runPowerShellScript(script: string): Promise<void> {
1038 const powershell = process.platform === 'win32' ? 'powershell.exe' : 'powershell';
1039 const encoded = Buffer.from(script, 'utf16le').toString('base64');
1040 await runCommand(powershell, ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-EncodedCommand', encoded]);
1041}
1042
1043async function commandExists(command: string): Promise<boolean> {
1044 return await new Promise<boolean>((resolve) => {

Callers 6

installDaemonFunction · 0.85
startDaemonFunction · 0.85
stopDaemonFunction · 0.85
restartDaemonFunction · 0.85
statusDaemonFunction · 0.85
uninstallDaemonFunction · 0.85

Calls 1

runCommandFunction · 0.85

Tested by

no test coverage detected