@@ -76,7 +76,7 @@ function _find_app_bundle(package)
76
76
if os .isfile (info_plist ) and os .isdir (macos_dir ) then
77
77
return abs_location , appbundle_name
78
78
else
79
- print ( " Invalid .app structure" )
79
+ raise ( " Invalid .app structure" )
80
80
end
81
81
end
82
82
end
@@ -135,7 +135,7 @@ function _create_staging_dir(package, app_source, appbundle_name, bg_image)
135
135
local bg_dest = path .join (staging_dir , path .filename (bg_image ))
136
136
os .vcp (bg_image , bg_dest )
137
137
if not os .isfile (bg_dest ) then
138
- print (" Warning: Failed to copy background image" )
138
+ wprint (" Warning: Failed to copy background image" )
139
139
end
140
140
end
141
141
return staging_dir
@@ -192,15 +192,7 @@ function _create_dmg_with_create_dmg(create_dmg, package, staging_dir, dmg_file,
192
192
os .vrunv (" mkdir" , {" -p" , path .directory (dmg_file )})
193
193
os .vrunv (" rm" , {" -f" , dmg_file })
194
194
-- run create-dmg
195
- local ok , errors = os .iorunv (create_dmg .program , args )
196
- if ok then
197
- return true
198
- else
199
- if errors then
200
- print (" Error output:" , errors )
201
- end
202
- return false
203
- end
195
+ os .iorunv (create_dmg .program , args )
204
196
end
205
197
-- verify dmg file
206
198
function _verify_dmg (dmg_file )
@@ -215,9 +207,11 @@ function _pack_dmg(package)
215
207
local create_dmg = _get_create_dmg ()
216
208
-- find existing .app bundle
217
209
local app_source , appbundle_name = _find_app_bundle (package )
210
+
218
211
if not app_source then
219
212
return false
220
213
end
214
+
221
215
-- find background image (optional)
222
216
local bg_image = _find_background_image (package )
223
217
-- get output dmg path
0 commit comments