mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: do not trigger shell in raw mode
This commit is contained in:
1 parent
dfde01c994
commit
2715f555a1
2 files changed
+2
-1
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hydrooj",
|
"name": "hydrooj",
|
||||||
"version": "3.8.5",
|
"version": "3.8.6",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ async function executeCommand(input: string) {
|
|||||||
if (input === 'exit' || input === 'quit' || input === 'shutdown') {
|
if (input === 'exit' || input === 'quit' || input === 'shutdown') {
|
||||||
return process.kill(process.pid, 'SIGINT');
|
return process.kill(process.pid, 'SIGINT');
|
||||||
}
|
}
|
||||||
|
if (process.stdin.isRaw) return false;
|
||||||
try {
|
try {
|
||||||
// eslint-disable-next-line no-eval
|
// eslint-disable-next-line no-eval
|
||||||
shell.info(await eval(input));
|
shell.info(await eval(input));
|
||||||
|
|||||||
Reference in new issue
Block a user