fix(js): set the unsafeHttpWhitelist when the set has any items (#21216)

This commit is contained in:
Jason Jean 2024-01-18 14:20:41 -05:00 committed by GitHub
parent d45a13e4fa
commit 8f6eed11d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -192,7 +192,7 @@ function setYarnUnsafeHttpWhitelist(
currentWhitelist: Set<string>,
options: VerdaccioExecutorSchema
) {
if (currentWhitelist.size > 1) {
if (currentWhitelist.size > 0) {
execSync(
`yarn config set unsafeHttpWhitelist --json '${JSON.stringify(
Array.from(currentWhitelist)