Skip to content

Commit

Permalink
fix(electron-updater): Allow --package-file arg to escape spaces in f…
Browse files Browse the repository at this point in the history
…ilenames (#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.
  • Loading branch information
jonzlin95 authored and develar committed Mar 25, 2018
1 parent 9748776 commit 24a585b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/electron-updater/src/NsisUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -188,4 +188,4 @@ export class NsisUpdater extends BaseUpdater {
}
return false
}
}
}

0 comments on commit 24a585b

Please sign in to comment.