Skip to content

Commit

Permalink
Improve error when app name is missing
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
sindresorhus committed Jun 6, 2020
1 parent c405205 commit 7a1ea2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ async function init() {
}

const appName = appInfo.CFBundleDisplayName || appInfo.CFBundleName;
if (!appName) {
throw new Error('The app must have `CFBundleDisplayName` or `CFBundleName` defined in its `Info.plist`.');
}

const dmgTitle = cli.flags.dmgTitle || appName;
const dmgPath = path.join(destinationPath, `${appName} ${appInfo.CFBundleShortVersionString}.dmg`);

Expand Down

0 comments on commit 7a1ea2b

Please sign in to comment.