Skip to content

Commit

Permalink
Merge pull request #39 from safedep/fix/trusted-registry-param-handling
Browse files Browse the repository at this point in the history
fix: Use trusted registry flag only if its not empty
  • Loading branch information
abhisek authored Aug 9, 2024
2 parents d4eab29 + 7a500ce commit cfc6fa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js

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

10 changes: 8 additions & 2 deletions src/vet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ export class Vet {
policyFilePath
]

if (this.config.trustedRegistries) {
if (
this.config.trustedRegistries &&
this.config.trustedRegistries.length > 0
) {
core.info(
`Using trusted registries: ${this.config.trustedRegistries.join(',')}`
)
Expand Down Expand Up @@ -231,7 +234,10 @@ export class Vet {
vetFinalScanArgs.push('--exceptions-extra', this.config.exceptionFile)
}

if (this.config.trustedRegistries) {
if (
this.config.trustedRegistries &&
this.config.trustedRegistries.length > 0
) {
core.info(
`Using trusted registries: ${this.config.trustedRegistries.join(',')}`
)
Expand Down

0 comments on commit cfc6fa4

Please sign in to comment.