Skip to content

Commit

Permalink
fix: Asar: false, causing exception on app startup with v16.4.0
Browse files Browse the repository at this point in the history
Close #1409
  • Loading branch information
develar committed Mar 27, 2017
1 parent 0278efb commit 7c6b4ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions packages/electron-builder-util/src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,11 @@ export class FileCopier {
if (typeof (<any>data).then === "function") {
data = await data
}
await writeFile(dest, data)
return

if (data != null) {
await writeFile(dest, data)
return
}
}
}
await copyFile(src, dest, stat, (!this.isUseHardLink || this.isUseHardLinkFunction == null) ? this.isUseHardLink : this.isUseHardLinkFunction(dest))
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-builder/src/platformPackager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions>
}

const defaultMatcher = createFileMatcher(this.info, appDir, resourcesPath, macroExpander, platformSpecificBuildOptions)
const isElectronCompile = isElectronCompileUsed(this.info)
const isElectronCompile = asarOptions != null && isElectronCompileUsed(this.info)
if (isElectronCompile) {
defaultMatcher.addPattern("!.cache{,/**/*}")
}
Expand Down

0 comments on commit 7c6b4ab

Please sign in to comment.