fix: unlink running sanctum binary before overwriting on Linux
All checks were successful
Build & Release / build (push) Successful in 3m0s
All checks were successful
Build & Release / build (push) Successful in 3m0s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9385499c4b
commit
64dbb318b0
1 changed files with 1 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ async function downloadAndInstall(url: string, version: string) {
|
||||||
const cmd =
|
const cmd =
|
||||||
process.platform === "win32"
|
process.platform === "win32"
|
||||||
? `powershell -Command "Expand-Archive -Force -Path '${zipPath}' -DestinationPath '${extractDir}'; $sub = (Get-ChildItem '${extractDir}' | Select-Object -First 1).FullName; Copy-Item -Recurse -Force \\"$sub\\*\\" '${installDir}'"`
|
? `powershell -Command "Expand-Archive -Force -Path '${zipPath}' -DestinationPath '${extractDir}'; $sub = (Get-ChildItem '${extractDir}' | Select-Object -First 1).FullName; Copy-Item -Recurse -Force \\"$sub\\*\\" '${installDir}'"`
|
||||||
: `unzip -o "${zipPath}" -d "${extractDir}" && SUBDIR=$(ls "${extractDir}" | head -1) && cp -rT "${extractDir}/$SUBDIR" "${installDir}"`;
|
: `unzip -o "${zipPath}" -d "${extractDir}" && SUBDIR=$(ls "${extractDir}" | head -1) && rm -f "${installDir}/sanctum" && cp -rT "${extractDir}/$SUBDIR" "${installDir}"`;
|
||||||
|
|
||||||
exec(cmd, { shell: process.platform === "win32" ? undefined : "/bin/bash" }, (err, _stdout, stderr) => {
|
exec(cmd, { shell: process.platform === "win32" ? undefined : "/bin/bash" }, (err, _stdout, stderr) => {
|
||||||
if (err) { console.error("[updater] extract failed:", stderr); reject(err); }
|
if (err) { console.error("[updater] extract failed:", stderr); reject(err); }
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue