From 5e7edea08b202f8fbc783d49159e61c561c1f7e7 Mon Sep 17 00:00:00 2001 From: jim800121chen Date: Thu, 26 Mar 2026 12:14:07 +0800 Subject: [PATCH] fix: replace backtick-n with [Environment]::NewLine in PS script Go raw strings (backtick-delimited) cannot contain backticks, so PowerShell's backtick-n newline literal breaks the Go compiler. Co-Authored-By: Claude Opus 4.6 (1M context) --- edge-ai-platform/installer/platform_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edge-ai-platform/installer/platform_windows.go b/edge-ai-platform/installer/platform_windows.go index 12093f6..1067b6c 100644 --- a/edge-ai-platform/installer/platform_windows.go +++ b/edge-ai-platform/installer/platform_windows.go @@ -189,12 +189,12 @@ try { # Step 3: Install driver via pnputil $pnpResult = & pnputil.exe /add-driver '%s' /install 2>&1 - $pnpText = $pnpResult -join "`n" + $pnpText = $pnpResult -join [Environment]::NewLine # If pnputil failed with signature error, try with /force (Windows 11 23H2+) if ($LASTEXITCODE -ne 0 -and $pnpText -match '簽章|signature|sign') { $pnpResult = & pnputil.exe /add-driver '%s' /install /force 2>&1 - $pnpText = $pnpResult -join "`n" + $pnpText = $pnpResult -join [Environment]::NewLine } # Cleanup cert file