17.14
This commit is contained in:
6
index.js
6
index.js
@ -1,6 +1,9 @@
|
||||
#!/usr/bin/env node
|
||||
import color from "picocolors";
|
||||
import { showMainMenu } from "./lib/menu.js";
|
||||
import { checkUpdate } from "./lib/update.js";
|
||||
|
||||
await checkUpdate();
|
||||
|
||||
while (true) {
|
||||
const selected = await showMainMenu();
|
||||
@ -9,8 +12,7 @@ while (true) {
|
||||
console.log(color.cyan("\n正在启动: " + selected.name + "...\n"));
|
||||
|
||||
try {
|
||||
const tool = await import(selected.module);
|
||||
const result = await tool.run();
|
||||
const result = await selected.tool.run();
|
||||
if (result === "back") continue;
|
||||
break;
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user