diff --git a/scripts/deploy-from-workstation.ps1 b/scripts/deploy-from-workstation.ps1 index a21b060e..00e343e1 100644 --- a/scripts/deploy-from-workstation.ps1 +++ b/scripts/deploy-from-workstation.ps1 @@ -232,6 +232,7 @@ function Get-RegctlPath { if (Test-Path -LiteralPath $regctlPath) { $actualHash = (Get-FileHash -LiteralPath $regctlPath -Algorithm SHA256).Hash.ToLowerInvariant() if ($actualHash -eq $expectedHash) { + if (-not $IsWindows) { chmod +x $regctlPath } return $regctlPath } Remove-Item -LiteralPath $regctlPath -Force @@ -248,6 +249,7 @@ function Get-RegctlPath { throw "regctl 校验失败:预期 $expectedHash,实际 $actualHash。" } Move-Item -LiteralPath $downloadPath -Destination $regctlPath -Force + if (-not $IsWindows) { chmod +x $regctlPath } } finally { if (Test-Path -LiteralPath $downloadPath) {