Skip to content

Commit

Permalink
Switch the content from array to string. (#1103)
Browse files Browse the repository at this point in the history
Fixed the issue: Azure/azure-sdk-for-js#11827

JS pipeline running super slow on array object of `Get-Content`.
Tested using -Raw, replacement works correctly and the entire process speeds up.
  • Loading branch information
sima-zhu authored and benbp committed Dec 1, 2020
1 parent e555298 commit 8d472bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/common/scripts/copy-docs-to-blobstorage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function Upload-Blobs
if ($ReleaseTag) {
foreach ($htmlFile in (Get-ChildItem $DocDir -include *.html -r))
{
$fileContent = Get-Content -Path $htmlFile
$fileContent = Get-Content -Path $htmlFile -Raw
$updatedFileContent = $fileContent -replace $RepoReplaceRegex, "`${1}$ReleaseTag"
if ($updatedFileContent -ne $fileContent) {
Set-Content -Path $htmlFile -Value $updatedFileContent
Expand Down

0 comments on commit 8d472bb

Please sign in to comment.