Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide useful error and exit gracefully if app has no usable version #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

homebysix
Copy link
Contributor

I recently came across an app without either a CFBundleShortVersionString or CFBundleVersion key in its Info.plist file. Quickpkg understandably failed to package the app, but the provided traceback didn't make it obvious to me what the problem was.

% ./quickpkg ~/Desktop/PCoIPClient.app             
Traceback (most recent call last):
  File "./quickpkg", line 427, in <module>
    result = cmdexec(analyzecmd)
  File "./quickpkg", line 35, in cmdexec
    proc = subprocess.Popen(
  File "/Library/ManagedFrameworks/Python/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Library/ManagedFrameworks/Python/Python3.framework/Versions/3.9/lib/python3.9/subprocess.py", line 1754, in _execute_child
    self.pid = _posixsubprocess.fork_exec(
TypeError: expected str, bytes or os.PathLike object, not NoneType

This pull request adds an exit condition if no usable version key is found that should eliminate this confusion if anybody encounters the same problem I did.

% ./quickpkg ~/Desktop/PCoIPClient.app                                         
Application at path /var/folders/0n/svv6yz7d5qlf59695s39bnx40000gn/T/tmpu2zm2dyp/payload/PCoIPClient.app does not have a CFBundleShortVersionString or CFBundleVersion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant