From 43d797c829333db78258ba2614b5b2ebbe389aa5 Mon Sep 17 00:00:00 2001 From: ozaki <29860391+OzakIOne@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:50:12 +0100 Subject: [PATCH] fix: -- argument --- src/npmToPnpm.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/npmToPnpm.ts b/src/npmToPnpm.ts index dc062c1..53ec848 100644 --- a/src/npmToPnpm.ts +++ b/src/npmToPnpm.ts @@ -123,6 +123,11 @@ const npmToPnpmTable = { export function npmToPnpm (_m: string, command: string): string { let args = parse((command || '').trim()) + const index = args.findIndex(a => a === '--') + if (index >= 0) { + args.splice(index, 1) + } + if (args[0] in npmToPnpmTable) { const converter = npmToPnpmTable[args[0] as keyof typeof npmToPnpmTable]