electron-updater
Advanced tools
Comparing version 6.3.2 to 6.3.3
@@ -44,3 +44,10 @@ "use strict"; | ||
const downloadedUpdateHelper = this.downloadedUpdateHelper; | ||
const installerPath = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.file; | ||
// Get the installer path, ensuring spaces are escaped on Linux | ||
// 1. Check if downloadedUpdateHelper is not null | ||
// 2. Check if downloadedUpdateHelper.file is not null | ||
// 3. If both checks pass: | ||
// a. If the platform is Linux, replace spaces with '\ ' for shell compatibility | ||
// b. If the platform is not Linux, use the original path | ||
// 4. If any check fails, set installerPath to null | ||
const installerPath = downloadedUpdateHelper && downloadedUpdateHelper.file ? (process.platform === "linux" ? downloadedUpdateHelper.file.replace(/ /g, "\\ ") : downloadedUpdateHelper.file) : null; | ||
const downloadedFileInfo = downloadedUpdateHelper == null ? null : downloadedUpdateHelper.downloadedFileInfo; | ||
@@ -47,0 +54,0 @@ if (installerPath == null || downloadedFileInfo == null) { |
@@ -21,2 +21,3 @@ import { GithubOptions, ReleaseNoteInfo, UpdateInfo, XElement } from "builder-util-runtime"; | ||
constructor(options: GithubOptions, updater: AppUpdater, runtimeOptions: ProviderRuntimeOptions); | ||
private get channel(); | ||
getLatestVersion(): Promise<GithubUpdateInfo>; | ||
@@ -23,0 +24,0 @@ private getLatestTagName; |
@@ -36,4 +36,8 @@ "use strict"; | ||
} | ||
get channel() { | ||
const result = this.updater.channel || this.options.channel; | ||
return result == null ? this.getDefaultChannelName() : this.getCustomChannelName(result); | ||
} | ||
async getLatestVersion() { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
const cancellationToken = new builder_util_runtime_1.CancellationToken(); | ||
@@ -116,3 +120,6 @@ const feedXml = (await this.httpRequest((0, util_1.newUrlFromBase)(`${this.basePath}.atom`, this.baseUrl), { | ||
try { | ||
const channel = this.updater.allowPrerelease ? this.getCustomChannelName(String(((_d = semver.prerelease(tag)) === null || _d === void 0 ? void 0 : _d[0]) || "latest")) : this.getDefaultChannelName(); | ||
let channel = this.channel; | ||
if (this.updater.allowPrerelease && ((_d = semver.prerelease(tag)) === null || _d === void 0 ? void 0 : _d[0])) { | ||
channel = this.getCustomChannelName(String((_e = semver.prerelease(tag)) === null || _e === void 0 ? void 0 : _e[0])); | ||
} | ||
rawData = await fetchData(channel); | ||
@@ -119,0 +126,0 @@ } |
{ | ||
"name": "electron-updater", | ||
"version": "6.3.2", | ||
"version": "6.3.3", | ||
"description": "Cross platform updater for electron applications", | ||
@@ -5,0 +5,0 @@ "main": "out/main.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
464109
4145