Skip to content

Commit

Permalink
use renameSync instead of mv
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondkmp committed Nov 23, 2024
1 parent 6a6bed4 commit c5a72f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-updater/src/AppImageUpdater.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AllPublishOptions, newError } from "builder-util-runtime"
import { execFileSync } from "child_process"
import { chmod } from "fs-extra"
import { unlinkSync } from "fs"
import { unlinkSync, renameSync } from "fs"
import * as path from "path"
import { DownloadUpdateOptions } from "./AppUpdater"
import { BaseUpdater, InstallOptions } from "./BaseUpdater"
Expand Down Expand Up @@ -93,7 +93,7 @@ export class AppImageUpdater extends BaseUpdater {
destination = path.join(path.dirname(appImageFile), path.basename(options.installerPath))
}

execFileSync("mv", ["-f", options.installerPath, destination])
renameSync(options.installerPath, destination)
if (destination !== appImageFile) {
this.emit("appimage-filename-updated", destination)
}
Expand Down

0 comments on commit c5a72f6

Please sign in to comment.