Skip to content

Commit

Permalink
fix: -- argument
Browse files Browse the repository at this point in the history
  • Loading branch information
OzakIOne authored Feb 13, 2024
1 parent 233ff64 commit 43d797c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/npmToPnpm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 43d797c

Please sign in to comment.