summaryrefslogtreecommitdiff
path: root/Components/InternalShell
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-11-28 17:31:34 +0100
committerMinteck <contact@minteck.org>2022-11-28 17:31:34 +0100
commit7923aa8942b55884320ef2428417e3ee4b121613 (patch)
tree7993632f2898b1998f25b11ce40a8d2eb3d44730 /Components/InternalShell
downloadmistyos-og-mane.tar.gz
mistyos-og-mane.tar.bz2
mistyos-og-mane.zip
Initial commitHEADmane
Diffstat (limited to 'Components/InternalShell')
-rw-r--r--Components/InternalShell/index.js14
-rw-r--r--Components/InternalShell/metadata.yml17
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'