From 4cea735a02110dd4ade23cdde71d359f093696fc Mon Sep 17 00:00:00 2001 From: Elliot Jordan Date: Sun, 3 Apr 2022 17:50:45 -0700 Subject: [PATCH] Provide useful error and exit gracefully if app has no usable version --- quickpkg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quickpkg b/quickpkg index 26b8d65..665c1e6 100755 --- a/quickpkg +++ b/quickpkg @@ -171,6 +171,13 @@ def appNameAndVersion(app_path): app_version = info_plist.get("CFBundleShortVersionString") if app_version is None or app_version == "": app_version = info_plist.get("CFBundleVersion") + if app_version is None or app_version == "": + print( + "Application at path %s does not have a " + "CFBundleShortVersionString or CFBundleVersion" % app_path + ) + # TODO: cleanup volumes here + cleanup_and_exit(1) return (app_name, app_identifier, app_version)