Skip to content

Commit

Permalink
fix: vet arg builder to allow repeatable args #42
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisek committed Aug 12, 2024
1 parent 4bd7c8f commit affc2e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/vet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,10 @@ export class Vet {
}

const defaultArgs = ['--no-banner']
const finalArgs = [...new Set(defaultArgs.concat(args))]

// We must not use Set here because args may repeat.
// For example --trusted-registry, --lockfiles etc.
const finalArgs = [...new Array(defaultArgs.concat(args))]

await exec.exec(this.vetBinaryPath, finalArgs, options)

Expand Down

0 comments on commit affc2e7

Please sign in to comment.