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

Function sh

sub/sub.ts:18–25  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

16const mainPrefix = prefixes[0];
17
18// 执行命令
19function sh(cmd: string): Promise<string> {
20 return new Promise((resolve, reject) => {
21 exec(cmd, { shell: "/bin/bash" }, (err, stdout, stderr) => {
22 if (err) reject(stderr || err.message);
23 else resolve(stdout);
24 });
25 });
26}
27
28// 检查是否在收藏夹

Callers 4

checkDockerIntegrityFunction · 0.85
getSubStoreVersionFunction · 0.85
getRemoteVersionFunction · 0.85
SubStorePluginClass · 0.85

Calls 1

execFunction · 0.85

Tested by

no test coverage detected