Skip to content

Commit

Permalink
fix: macOS failing when there is no old icon (#1658)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Pereira authored and develar committed Jun 13, 2017
1 parent 54ac796 commit ac44fcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/electron-builder/src/packager/mac.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BluebirdPromise from "bluebird-lst"
import { asArray, getPlatformIconFileName, use } from "electron-builder-util"
import { copyFile, copyOrLinkFile, unlinkIfExists } from "electron-builder-util/out/fs"
import { warn } from "electron-builder-util/out/log"
import { readFile, rename, unlink, utimes, writeFile } from "fs-extra-p"
import { readFile, rename, utimes, writeFile } from "fs-extra-p"
import * as path from "path"
import { build as buildPlist, parse as parsePlist } from "plist"
import { normalizeExt, PlatformPackager } from "../platformPackager"
Expand Down Expand Up @@ -151,7 +151,7 @@ export async function createApp(packager: PlatformPackager<any>, appOutDir: stri
]

if (icon != null) {
promises.push(unlink(path.join(resourcesPath, oldIcon)))
promises.push(unlinkIfExists(path.join(resourcesPath, oldIcon)))
promises.push(copyFile(icon, path.join(resourcesPath, appPlist.CFBundleIconFile)))
}

Expand Down
12 changes: 4 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1231,9 +1231,9 @@ fb-watchman@^2.0.0:
dependencies:
bser "^2.0.0"

fcopy-pre-bundled@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/fcopy-pre-bundled/-/fcopy-pre-bundled-0.1.2.tgz#656baeb0d0c450cafa9c902664d440ceb99bcde1"
fcopy-pre-bundled@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/fcopy-pre-bundled/-/fcopy-pre-bundled-0.2.0.tgz#846195cb53cf0a987ca9ebee4d70f81277c10f8a"

feature-detect-es6@^1.3.1:
version "1.3.1"
Expand Down Expand Up @@ -2948,14 +2948,10 @@ sanitize-filename@^1.6.1:
dependencies:
truncate-utf8-bytes "^1.0.0"

sax@1.2.1:
sax@1.2.1, sax@>=0.6.0, sax@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a"

sax@>=0.6.0, sax@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828"

semver-diff@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
Expand Down

0 comments on commit ac44fcd

Please sign in to comment.