diff --git a/eng/scripts/check-external-dependency.ps1 b/eng/scripts/check-external-dependency.ps1 index 55709632c8b7..688d0344cfff 100644 --- a/eng/scripts/check-external-dependency.ps1 +++ b/eng/scripts/check-external-dependency.ps1 @@ -17,8 +17,8 @@ $deprecatedDependency = "Deprecated-Dependency" $dependencyRegex = "^\+\s(?[\S]*)\s(?[\S]*)\s\((?[0-9\.a-b]*).*\)\s?(?deprecated)?" $RepoRoot = Resolve-Path -Path "${PSScriptRoot}/../.." Write-Host "Repo root: $RepoRoot" -$rushFile = join-Path -Path $RepoRoot "rush.json" -Write-Host "Path to rush.json: $rushFile" +$pnpmConfigFile = Join-path -Path $RepoRoot "common" "config" "rush" "pnpm-config.json" +Write-Host "Path to pnpm-config.json: $pnpmConfigFile" $commonConfigFile = Join-path -Path $RepoRoot "common" "config" "rush" "common-versions.json" Write-Host "Path to common-versions.json: $commonConfigFile" @@ -81,17 +81,17 @@ function Set-GitHubIssue($Package) { # Update rush configuration files to alter settings -if ((Test-Path $rushFile) -and (Test-Path $commonConfigFile)) { - $rushJson = Get-Content -Path $rushFile | ConvertFrom-Json - $rushJson.pnpmOptions.strictPeerDependencies = $false - Set-Content -Path $rushFile -Value (ConvertTo-Json -InputObject $rushJson) +if ((Test-Path $pnpmConfigFile) -and (Test-Path $commonConfigFile)) { + $pnpmConfigJson = Get-Content -Path $pnpmConfigFile | ConvertFrom-Json + $pnpmConfigJson.strictPeerDependencies = $false + Set-Content -Path $pnpmConfigFile -Value (ConvertTo-Json -InputObject $pnpmConfigJson) $configJson = Get-Content -Path $commonConfigFile | ConvertFrom-Json $configJson.implicitlyPreferredVersions = $true Set-Content -Path $commonConfigFile -Value (ConvertTo-Json -InputObject $configJson) } else { - Write-Error "Failed to find $($rushFile) and/or $($commonConfigFile). Verify repo root parameter." + Write-Error "Failed to find $($pnpmConfigFile) and/or $($commonConfigFile). Verify repo root parameter." exit 1 }