From 37f8b1bb8829a5c697006430895cc97a7953d298 Mon Sep 17 00:00:00 2001 From: DonovanYe <72693206+Donovan-Ye@users.noreply.github.com> Date: Mon, 9 Sep 2024 21:49:15 +0800 Subject: [PATCH] chore(runner): delete useless if-statement used to print version info (#233) --- src/runner.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/runner.ts b/src/runner.ts index 88e7187..6925b65 100644 --- a/src/runner.ts +++ b/src/runner.ts @@ -122,11 +122,6 @@ export async function run(fn: Runner, args: string[], options: DetectOptions = { return } - if (args.length === 1 && (args[0] === '--version' || args[0] === '-v')) { - console.log(`@antfu/ni v${version}`) - return - } - if (args.length === 1 && ['-h', '--help'].includes(args[0])) { const dash = c.dim('-') console.log(c.green(c.bold('@antfu/ni')) + c.dim(` use the right package manager v${version}\n`))