From 5883c95d82c0842c36a7669d02d18954d6670f54 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Tue, 24 Sep 2024 23:58:26 +0800 Subject: [PATCH] a? --- plugins/md5/md5-api.js | 2 +- plugins/md5/md5-api.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/md5/md5-api.js b/plugins/md5/md5-api.js index ca7af93..e9ca44d 100644 --- a/plugins/md5/md5-api.js +++ b/plugins/md5/md5-api.js @@ -231,7 +231,7 @@ function main() { fs = require("fs"); path = require("path"); process = require("process"); - if (!("fight" in process.argv)) return [3 /*break*/, 2]; + if (!(process.argv.length > 2 && process.argv[2] === "fight")) return [3 /*break*/, 2]; names_1 = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); return [4 /*yield*/, fight_only(names_1)]; case 1: diff --git a/plugins/md5/md5-api.ts b/plugins/md5/md5-api.ts index b276ba4..a62ae56 100644 --- a/plugins/md5/md5-api.ts +++ b/plugins/md5/md5-api.ts @@ -201,7 +201,7 @@ async function main() { const process = require("process"); // 读取 cli // 有 fight 参数就开启 fight_only模式 - if ("fight" in process.argv) { + if (process.argv.length > 2 && process.argv[2] === "fight") { const names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8"); await fight_only(names); return;