File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ const cli = meow(`
22
22
Options
23
23
--overwrite Overwrite existing DMG with the same name
24
24
--identity=<value> Manually set code signing identity (automatic by default)
25
- --dmg-title=<value> Manually set title of DMG volume (only used if app name is >27 character limit)
25
+ --dmg-title=<value> Manually set DMG title (must be <=27 characters) [default: App name]
26
26
27
27
Examples
28
28
$ create-dmg 'Lungo.app'
@@ -79,9 +79,14 @@ async function init() {
79
79
}
80
80
81
81
const appName = appInfo . CFBundleDisplayName || appInfo . CFBundleName ;
82
- const dmgTitle = appName . length > 27 ? ( cli . flags . dmgTitle || appName ) : appName ;
82
+ const dmgTitle = cli . flags . dmgTitle || appName ;
83
83
const dmgPath = path . join ( destinationPath , `${ appName } ${ appInfo . CFBundleShortVersionString } .dmg` ) ;
84
84
85
+ if ( dmgTitle > 27 ) {
86
+ ora . fail ( 'The disk image title cannot exceed 27 characters. This is a limitation in a dependency: https://github.com/LinusU/node-alias/issues/7' ) ;
87
+ process . exit ( 1 ) ;
88
+ }
89
+
85
90
if ( cli . flags . overwrite ) {
86
91
try {
87
92
fs . unlinkSync ( dmgPath ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ $ create-dmg --help
27
27
Options
28
28
--overwrite Overwrite existing DMG with the same name
29
29
--identity=<value> Manually set code signing identity (automatic by default)
30
- --dmg-title=<value> Manually set title of DMG volume (only used if app name is >27 character limit)
30
+ --dmg-title=<value> Manually set DMG title (must be <=27 characters) [default: App name]
31
31
32
32
Examples
33
33
$ create-dmg 'Lungo.app'
You can’t perform that action at this time.
0 commit comments