脚本写错了?

This commit is contained in:
shenjack 2024-09-24 23:54:31 +08:00
parent f633194024
commit 81d2df7fd5
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ function main() {
fs = require("fs"); fs = require("fs");
path = require("path"); path = require("path");
process = require("process"); process = require("process");
if (!(process.argv.length > 2 && process.argv[2] === "fight")) return [3 /*break*/, 2]; if (!("fight" in process.argv)) return [3 /*break*/, 2];
names_1 = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); names_1 = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
return [4 /*yield*/, fight_only(names_1)]; return [4 /*yield*/, fight_only(names_1)];
case 1: case 1:

View File

@ -201,7 +201,7 @@ async function main() {
const process = require("process"); const process = require("process");
// 读取 cli // 读取 cli
// 有 fight 参数就开启 fight_only模式 // 有 fight 参数就开启 fight_only模式
if (process.argv.length > 2 && process.argv[2] === "fight") { if ("fight" in process.argv) {
const names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); const names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
await fight_only(names); await fight_only(names);
return; return;