Skip to content

Commit 0c40d87

Browse files
committed
fix: properly decode downloaded script content on Windows
Convert byte array to UTF-8 string before writing to temp file to prevent outputting raw byte values instead of script content
1 parent 63e192b commit 0c40d87

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install-windows.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Write-Host "Installing dbc CLI version: $Version"
88

99
try {
1010
# Download the official Windows install script
11-
$installScript = (Invoke-WebRequest -Uri "https://dbc.columnar.tech/install.ps1" -UseBasicParsing).Content
11+
$response = Invoke-WebRequest -Uri "https://dbc.columnar.tech/install.ps1" -UseBasicParsing
12+
$installScript = [System.Text.Encoding]::UTF8.GetString($response.Content)
1213

1314
# Save to temporary file to avoid Invoke-Expression security risks
1415
$tempScript = Join-Path $env:TEMP "dbc-install-$(Get-Random).ps1"

0 commit comments

Comments
 (0)