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 Oct 19, 2020
1 parent 0cf4a2a commit c9ea0fb
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 c9ea0fb

Please sign in to comment.