MCPcopy
hub / github.com/ntfstool/ntfstool / execShell

Function execShell

src/common/utils/AlfwShell.js:45–68  ·  view source on GitHub ↗
(shell)

Source from the content-addressed store, hash-verified

43 * @returns {Promise<any>}
44 */
45export function execShell(shell) {
46 return new Promise((resolve, reject) => {
47 try {
48 exec(shell, (error, stdout, stderr) => {
49 saveLog.log("execShell", {
50 code: shell,
51 stdout: stdout,
52 stderr: stderr,
53 })
54 if (stderr) {
55 reject(stdout + error);
56 return;
57 }
58
59 if (!stdout && stderr) {
60 stdout = stderr;
61 }
62 resolve(stdout, stderr)
63 });
64 } catch (e) {
65 saveLog.error(e, "execShell");
66 }
67 })
68}
69
70
71/**

Callers 4

openLogFunction · 0.90
reMountNtfsFunction · 0.90
openInFinderFunction · 0.90
systemNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected