@@ -33,21 +33,20 @@ export class DmgTarget extends Target {
33
33
async build ( appOutDir : string ) {
34
34
const appInfo = this . packager . appInfo
35
35
const artifactPath = path . join ( appOutDir , `${ appInfo . productFilename } -${ appInfo . version } .dmg` )
36
- await new BluebirdPromise < any > ( async ( resolve , reject ) => {
37
- log ( "Creating DMG" )
38
- const dmgOptions = {
39
- target : artifactPath ,
40
- basepath : this . packager . projectDir ,
41
- specification : await this . computeDmgOptions ( appOutDir ) ,
42
- }
43
-
44
- if ( debug . enabled ) {
45
- debug ( `appdmg: ${ JSON . stringify ( dmgOptions , < any > null , 2 ) } ` )
46
- }
36
+ log ( "Creating DMG" )
37
+ const dmgOptions = {
38
+ target : artifactPath ,
39
+ basepath : this . packager . projectDir ,
40
+ specification : await this . computeDmgOptions ( appOutDir ) ,
41
+ }
42
+ if ( debug . enabled ) {
43
+ debug ( `appdmg: ${ JSON . stringify ( dmgOptions , < any > null , 2 ) } ` )
44
+ }
47
45
48
- const emitter = require ( "appdmg" ) ( dmgOptions )
46
+ const emitter = require ( "appdmg" ) ( dmgOptions )
47
+ await new BluebirdPromise ( ( resolve , reject ) => {
49
48
emitter . on ( "error" , reject )
50
- emitter . on ( "finish" , ( ) => resolve ( ) )
49
+ emitter . on ( "finish" , resolve )
51
50
if ( debug . enabled ) {
52
51
emitter . on ( "progress" , ( info : any ) => {
53
52
if ( info . type === "step-begin" ) {
0 commit comments