diff options
Diffstat (limited to 'Components/InternalShell')
-rw-r--r-- | Components/InternalShell/index.js | 14 | ||||
-rw-r--r-- | Components/InternalShell/metadata.yml | 17 |
2 files changed, 31 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 diff --git a/Components/InternalShell/metadata.yml b/Components/InternalShell/metadata.yml new file mode 100644 index 0000000..d196032 --- /dev/null +++ b/Components/InternalShell/metadata.yml @@ -0,0 +1,17 @@ +description: Internal shell +internal: true + +aliases: [] + +manual: + summary: "" + + parameters: [] + + final: null + + examples: [] + + compatibility: + mistyos: '>=1.0.0' + kernel: '>=5.10.0' |