MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / run

Method run

warp/warp.ts:20–31  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

18const prefixes = getPrefixes();
19const mainPrefix = prefixes[0] || ".";
20// 命令执行统一封装
21class SystemExecutor {
22 static async run(cmd: string): Promise<{ success: boolean; output: string; error?: string }> {
23 try {
24 const { stdout, stderr } = await execAsync(cmd);
25 return { success: true, output: String(stdout ?? "").trim(), error: String(stderr ?? "").trim() };
26 } catch (e: any) {
27 return {
28 success: false,
29 output: String(e?.stdout ?? "").trim(),
30 error: String(e?.stderr ?? e?.message ?? e ?? "").trim(),
31 };
32 }
33 }
34

Callers 15

runSudoMethod · 0.95
setMethod · 0.80
createPrizeWarehouseFunction · 0.80
addPrizeToWarehouseFunction · 0.80
consumePrizeFunction · 0.80
clearWarehouseFunction · 0.80
clearAllWarehousesFunction · 0.80
deleteLotteryActivityFunction · 0.80
createLotteryConfigFunction · 0.80
addParticipantToLotteryFunction · 0.80
updateWinnerStatusFunction · 0.80
updateWinnerStatusByUserFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected