From 24a585b826a505ed4d8a5e48d41dcedf6dea5966 Mon Sep 17 00:00:00 2001 From: Jonathan Lin Date: Sun, 25 Mar 2018 11:44:53 -0700 Subject: [PATCH] fix(electron-updater): Allow --package-file arg to escape spaces in filenames (#2739) Right now package file doesn't escape spaces in the filename, which causes a bug where the package file passed to the nsis installer to be incorrect. This means that when the installer runs, it will fail on folders such as `C:\Users\first last\appdata\roaming\package-version.7z` This fixes it by forcing the whole file path to be a single arg. --- packages/electron-updater/src/NsisUpdater.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/electron-updater/src/NsisUpdater.ts b/packages/electron-updater/src/NsisUpdater.ts index 1529ea7899b..324ee85ae14 100644 --- a/packages/electron-updater/src/NsisUpdater.ts +++ b/packages/electron-updater/src/NsisUpdater.ts @@ -106,7 +106,7 @@ export class NsisUpdater extends BaseUpdater { const packagePath = this.downloadedUpdateHelper.packageFile if (packagePath != null) { // only = form is supported - args.push(`--package-file=${packagePath}`) + args.push(`--package-file="${packagePath}"`) } const spawnOptions = { @@ -188,4 +188,4 @@ export class NsisUpdater extends BaseUpdater { } return false } -} \ No newline at end of file +}