fix The string is missing the terminator

This commit is contained in:
2026-09-13 15:38:25 +03:00
parent 733db8577f
commit b21215c582
+37 -2
View File
@@ -616,7 +616,7 @@ jobs:
throw "RUSTDESK_KEY secret is empty"
}
@'
$pythonCode = @'
import json
import os
import re
@@ -630,6 +630,12 @@ jobs:
server = os.environ["ID_SERVER"].strip()
key = os.environ["PUB_KEY"].strip()
if not server:
raise SystemExit("RUSTDESK_ID_SERVER is empty")
if not key:
raise SystemExit("RUSTDESK_KEY is empty")
text = path.read_text(encoding="utf-8")
text, server_count = re.subn(
@@ -663,7 +669,36 @@ jobs:
)
path.write_text(text, encoding="utf-8")
PY
print(f"ID server configured: {server}")
print("Server public key configured successfully")
print("Relay configuration untouched")
'@
$pythonCode | python -
if ($LASTEXITCODE -ne 0) {
throw "RustDesk configuration patch failed"
}
Write-Host ""
Write-Host "Checking patched RustDesk configuration..."
$config = Get-Content `
"rustdesk\libs\hbb_common\src\config.rs" `
-Raw
if ($config -notmatch "RENDEZVOUS_SERVERS") {
throw "RENDEZVOUS_SERVERS not found after patch"
}
if ($config -notmatch "RS_PUB_KEY") {
throw "RS_PUB_KEY not found after patch"
}
Write-Host "Custom ID server: OK"
Write-Host "Custom public key: OK"
Write-Host "Relay untouched: OK"
- name: Install RustDesk vcpkg dependencies
shell: pwsh