修正 macOS 增量发布工具执行权限

This commit is contained in:
chenxi 2026-09-28 10:49:32 +08:00
parent 6210d496ba
commit b1c2eabac4

View File

@ -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) {