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

Command-line utilities not found when tarsnap is installed through Homebrew #168

Open
kainjow opened this issue Sep 22, 2017 · 6 comments
Open

Comments

@kainjow
Copy link

kainjow commented Sep 22, 2017

I installed tarsnap through Homebrew and went to run the GUI but it couldn't find the utilities. If I enter "/usr/local/bin" it will let me proceed. Maybe it should check this folder (or better yet PATH)?

@apjanke
Copy link
Contributor

apjanke commented May 31, 2018

How did you run the GUI? And what exactly did you do that encountered the error? If this is failing, it might be an issue with the Homebrew formula.

@shawwn
Copy link
Contributor

shawwn commented Aug 22, 2018

I ran into this once too. I'm not sure how to replicate it, but I noticed something strange in the logs when I ran Tarsnap.app for the first time:

unknown(0): System language is  English
unknown(0): Error creating the PersistentStore: app.appdata not set.
unknown(0): Error creating the PersistentStore: app.appdata not set.
unknown(0): PersistentStore was not initialized properly.
unknown(0): PersistentStore not initialized.

On the other hand, I tested the new cask formula on a fresh laptop and got no issues.

shawwn added a commit to shawwn/tarsnap-gui that referenced this issue Aug 23, 2018
@gperciva
Copy link
Member

Note to self: if you run

open ./Tarsnap.app
./Tarsnap.app/Contents/MacOS/Tarsnap

then it'll inherit the $PATH from your shell. To reproduce this bug, you must launch Tarsnap.app from the Finder.

@gperciva
Copy link
Member

Also note to self: you can test with

PATH=/usr/bin:/bin:/usr/sbin:/sbin ./Tarsnap.app/Contents/MacOS/Tarsnap 

to see the debug console log messages.

@gperciva
Copy link
Member

Huh, I thought that I fixed this (at the time) in #204.

Oh well. It's a problem again now for Apple Silicon machines, since homebrew changed the installation directory. They deliberately do not include the command-line utilities in their PATH https://docs.brew.sh/FAQ#my-mac-apps-dont-find-homebrew-utilities.

Fortunately, there's an easy solution: in addition to searching /usr/local/bin (which was what #204 did), we need to search /opt/homebrew/bin.

(In theory, we could pick the directory based on what type of architecture we're running on, like Tarsnap/tarsnap@87a1be9, but I don't think we need to complicate it like that.)

@gperciva
Copy link
Member

Fixed in master, but I'll leave this issue open until we release 1.0.3.

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

Successfully merging a pull request may close this issue.

4 participants