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

some brew-file operations fail when mdfind returns bad information #284

Open
zcutlip opened this issue Sep 5, 2024 · 1 comment
Open

Comments

@zcutlip
Copy link

zcutlip commented Sep 5, 2024

This is a hard problem to reproduce. Occasionally spotlight seems to have improperly indexed /Applications, and this causes brew-file to break.

The last time it happened, I ran brew file update, and got the following error:

[ERROR] Failed at command: mdls -attr kMDItemAppStoreAdamID -attr kMDItemVersion bad path C66D0C00-0000-0000-9000-006B00000000
bad path C66D0C00-0000-0000-9000-006B00000000: could not find bad path C66D0C00-0000-0000-9000-006B00000000.

I tracked it down to a problem with the output of mdfind 'kMDItemAppStoreHasReceipt=1':

/Applications/Wallaroo.app
/Applications/Kagi for Safari.app
/Applications/PCalc.app
/Applications/AutoMounter.app
/Applications/NewFileMenu.app
/Applications/Okta Verify.app
/Applications/Screens 5.app
/Applications/Discovery.app
/Applications/StopTheMadness Pro.app
bad path C66D0C00-0000-0000-9000-006B00000000
bad path 19F07200-0000-0000-9000-006B00000000
bad path A6420E00-0000-0000-9000-006B00000000
bad path B6286400-0000-0000-9000-006B00000000
bad path 93467800-0000-0000-9000-006B00000000

I fix it by disabling/reenabling spotlight, forcing a re-index, but it eventually comes back.

Of course the real problem is with spotlight and not brew-file, but I'm filing the issue in case brew-file wants to be more robust when processing mdfind output.

@rcmdnk
Copy link
Owner

rcmdnk commented Sep 6, 2024

Though I could not reproduce the problem,
I added to check the app there.
If it is wrong name (or if the app does not exist), brew-file just shows warning and continues.
Could you please try v9.0.19?

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

No branches or pull requests

2 participants