Skip to content

Commit

Permalink
fix: update appstore dict check to log warnings for incorrect app nam…
Browse files Browse the repository at this point in the history
…es and non-existent apps

chore: bump version to 9.0.19 and update release date to 6/Sep/2024
chore: update version to 9.0.19 in pyproject.toml
  • Loading branch information
rcmdnk committed Sep 6, 2024
1 parent b76fab3 commit ac5e7f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions bin/brew-file
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ __author__ = "rcmdnk"
__copyright__ = "Copyright (c) 2013 rcmdnk"
__credits__ = ["rcmdnk"]
__license__ = "MIT"
__version__ = "9.0.18"
__date__ = "4/Sep/2024"
__version__ = "9.0.19"
__date__ = "6/Sep/2024"
__maintainer__ = "rcmdnk"
__email__ = "rcmdnk@gmail.com"
__status__ = "Prototype"
Expand Down Expand Up @@ -1896,12 +1896,18 @@ class BrewFile:

def get_appstore_dict(self) -> dict[str, list[str]]:
apps: dict[str, list[str]] = {}
ret, apps_tmp = self.helper.proc(
_, apps_tmp = self.helper.proc(
"mdfind 'kMDItemAppStoreHasReceipt=1'",
print_cmd=False,
print_out=False,
)
for a in apps_tmp:
if not a.endswith(".app"):
self.log.warning(f"Incorrect app name in mdfind: {a}")
continue
if not Path(a).is_dir():
self.log.warning(f"App doesn't exist: {a}")
continue
_, lines = self.helper.proc(
f"mdls -attr kMDItemAppStoreAdamID -attr kMDItemVersion '{a}'",
print_cmd=False,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "brew-file"
version = "9.0.18"
version = "9.0.19"
description = "Brewfile manager for Homebrew"
authors = ["rcmdnk <rcmdnk@gmail.com>"]

Expand Down

0 comments on commit ac5e7f3

Please sign in to comment.