mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 17:46:28 +08:00
core: use alpha-indexed id in contest
This commit is contained in:
1 parent
8852aa149b
commit
800b332c8b
8 files changed
+39
-33
No files matched your search
@@ -120,6 +120,7 @@ async function reload(count = 1) {
|
||||
|
||||
const shell = new Logger('shell');
|
||||
async function executeCommand(input: string) {
|
||||
input = input.trim();
|
||||
// Clear the stack
|
||||
setImmediate(async () => {
|
||||
if (input === 'restart') return reload();
|
||||
@@ -128,7 +129,7 @@ async function executeCommand(input: string) {
|
||||
}
|
||||
try {
|
||||
// eslint-disable-next-line no-eval
|
||||
shell.info(await eval(input.trim()));
|
||||
shell.info(await eval(input));
|
||||
} catch (e) {
|
||||
shell.warn(e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user