@@ -206,7 +206,7 @@ module.exports = exports = function (options) {
206206 **/
207207
208208 pipeline . addStep ( 'Creating temporary image' , function ( next ) {
209- hdiutil . create ( global . opts . title , `${ global . megabytes } m` , function ( err , temporaryImagePath ) {
209+ hdiutil . create ( global . opts . title , `${ global . megabytes } m` , global . opts . filesystem , function ( err , temporaryImagePath ) {
210210 if ( err ) return next ( err )
211211
212212 pipeline . addCleanupStep ( 'unlink-temporary-image' , 'Removing temporary image' , function ( next ) {
@@ -396,15 +396,20 @@ module.exports = exports = function (options) {
396396 **/
397397
398398 pipeline . addStep ( 'Blessing image' , function ( next ) {
399- const args = [
400- '--folder' , global . temporaryMountPath
401- ]
399+ // Blessing does not work for APFS disk images
400+ if ( global . opts . filesystem != "APFS" ) {
401+ const args = [
402+ '--folder' , global . temporaryMountPath
403+ ]
404+
405+ if ( os . arch ( ) !== 'arm64' ) {
406+ args . push ( '--openfolder' , global . temporaryMountPath )
407+ }
402408
403- if ( os . arch ( ) !== 'arm64' ) {
404- args . push ( '--openfolder' , global . temporaryMountPath )
409+ util . sh ( 'bless' , args , next )
410+ } else {
411+ next . skip ( )
405412 }
406-
407- util . sh ( 'bless' , args , next )
408413 } )
409414
410415 /**
0 commit comments