Skip to content

Commit 8233eae

Browse files
AdrianoFerraridevelar
authored andcommitted
fix(auto-updater): use updateInfo.path as AppImage installer name (#2722)
Close #2672
1 parent 2dda5fc commit 8233eae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/electron-updater/src/BaseUpdater.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export abstract class BaseUpdater extends AppUpdater {
3737

3838
const cacheDir = this.downloadedUpdateHelper.cacheDir
3939
await ensureDir(cacheDir)
40-
const updateFileName = `installer-${version}.${taskOptions.fileExtension}`
40+
const updateFileName = taskOptions.fileExtension === "AppImage" ? path.basename(updateInfo.path) : `installer-${version}.${taskOptions.fileExtension}`
4141
const updateFile = path.join(cacheDir, updateFileName)
4242
const packageFile = packageInfo == null ? null : path.join(cacheDir, `package-${version}.${path.extname(packageInfo.path) || "7z"}`)
4343

@@ -147,4 +147,4 @@ export interface DownloadExecutorTask {
147147
readonly fileInfo: ResolvedUpdateFileInfo
148148
readonly updateInfo: UpdateInfo
149149
readonly task: (destinationFile: string, packageFile: string | null, removeTempDirIfAny: () => Promise<any>) => Promise<any>
150-
}
150+
}

0 commit comments

Comments
 (0)