fix: remove regex search from Select-String

This commit is contained in:
Parkreiner
2024-06-24 21:47:01 +00:00
parent 14e3fc5b6b
commit fba0f842a9

View File

@@ -103,7 +103,7 @@ ${templatefile("${path.module}/devolutions-patch.js", {
'@ | Set-Content "$root\coder.js" '@ | Set-Content "$root\coder.js"
# Only inject the src if we have not before. # Only inject the src if we have not before.
$isPatched = Select-String -Path "$devolutionsHtml" -Pattern "$patch" $isPatched = Select-String -Path "$devolutionsHtml" -Pattern "$patch" -SimpleMatch
if ($isPatched -eq $null) { if ($isPatched -eq $null) {
(Get-Content $devolutionsHtml).Replace('</app-root>', "</app-root>$patch") | Set-Content $devolutionsHtml (Get-Content $devolutionsHtml).Replace('</app-root>', "</app-root>$patch") | Set-Content $devolutionsHtml
} }