mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2024-12-23 10:38:55 +00:00
Ensure the out dir specified exists when building OSX app
This commit is contained in:
parent
ab5da23a70
commit
1e1a479b23
6
mac.js
6
mac.js
@ -98,8 +98,11 @@ function buildMacApp (opts, cb, newApp) {
|
|||||||
|
|
||||||
function moveApp () {
|
function moveApp () {
|
||||||
// finally, move app into cwd
|
// 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) {
|
fs.rename(newApp, finalPath, function moved (err) {
|
||||||
if (err) return cb(err)
|
if (err) return cb(err)
|
||||||
if (opts.asar) {
|
if (opts.asar) {
|
||||||
@ -111,6 +114,7 @@ function buildMacApp (opts, cb, newApp) {
|
|||||||
updateMacIcon()
|
updateMacIcon()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateMacIcon () {
|
function updateMacIcon () {
|
||||||
|
Loading…
Reference in New Issue
Block a user