diff options
author | Minteck <contact@minteck.org> | 2022-11-28 17:31:34 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-11-28 17:31:34 +0100 |
commit | 7923aa8942b55884320ef2428417e3ee4b121613 (patch) | |
tree | 7993632f2898b1998f25b11ce40a8d2eb3d44730 /Components/InternalShell/index.js | |
download | mistyos-og-mane.tar.gz mistyos-og-mane.tar.bz2 mistyos-og-mane.zip |
Diffstat (limited to 'Components/InternalShell/index.js')
-rw-r--r-- | Components/InternalShell/index.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Components/InternalShell/index.js b/Components/InternalShell/index.js new file mode 100644 index 0000000..682da6e --- /dev/null +++ b/Components/InternalShell/index.js @@ -0,0 +1,14 @@ +const child_process = require("child_process"); +global.log = require('../../MistyCore/log'); + +module.exports = (arguments) => { + let args = []; + + if (arguments['_finals'].length > 0) { + args = [ "-c", arguments['_finals'].join(" ") ]; + } + + log("Shell-InternalShell", "Starting internal shell"); + child_process.execFileSync("/System/Binaries/sh", args, { stdio: "inherit" }); + log("Shell-InternalShell", "Stopped internal shell"); +}
\ No newline at end of file |