1
0
mirror of https://github.com/jiahaog/Nativefier synced 2024-06-29 08:00:47 +02:00

Merge pull request #24 from malept/ensure-outdir-exists

Ensure the out dir specified exists when building OSX app
This commit is contained in:
Max Ogden 2015-05-10 16:45:29 -07:00
commit be46561151

6
mac.js
View File

@ -98,8 +98,11 @@ function buildMacApp (opts, cb, newApp) {
function moveApp () {
// finally, move app into cwd
var finalPath = path.join(opts.out || process.cwd(), opts.name + '.app')
var outdir = opts.out || process.cwd()
var finalPath = path.join(outdir, opts.name + '.app')
mkdirp(outdir, function mkoutdirp () {
if (err) return cb(err)
fs.rename(newApp, finalPath, function moved (err) {
if (err) return cb(err)
if (opts.asar) {
@ -111,6 +114,7 @@ function buildMacApp (opts, cb, newApp) {
updateMacIcon()
}
})
})
}
function updateMacIcon () {