summaryrefslogtreecommitdiff
path: root/Components/InternalShell/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'Components/InternalShell/index.js')
-rw-r--r--Components/InternalShell/index.js14
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