Speedup pass on macOS and brew
Alfonso Gómez-Arzola
alfonso at agarzola.com
Thu Sep 26 15:44:17 CEST 2019
I recently had pass stop working out of the blue, saying `getopt` was not
available. After a bit of digging, I found that the issue was that `brew`
needed me to accept the XCode license again for some reason. That (I guess)
returned a non-zero status code, which pass (I guess) took to mean `brew`
was not part of the picture. Accepting this license may be necessary for
brew to work, but it should not be necessary for pass to use the already
installed `gnu-getopt`, and the bug was a bit of a pain to track down.
So add another pro to Allan’s list: `pass` would not be affected when brew
(or one of its dependencies) starts throwing a fit.
—
Alfonso Gómez-Arzola
On Thu, Sep 26, 2019 at 3:19 AM Allan Odgaard <lists+pass at simplit.com>
wrote:
> On 26 Oct 2018, at 12:12, pass-maillinglist at artursterz.de wrote:
>
> All right, looks like I have found a good solution thanks to my teammate
> Jonas. It’s a multi-staged lookup. First, look in $PATH, if it’s not there,
> try to get it from brew, then from macports.
>
> I came to the realization that pass should *not* try to guess which
> package manager can provide gnu-getopt.
>
> If the user has a package manager, it is only reasonable to assume pass
> was installed using a package manager, and therefore the package manager
> should patch pass to use gnu-getopt provided by the package manager (and
> setup as a dependency).
>
> So by default, pass should simply use getopt via PATH or possibly
> gnu-getopt or /usr/local/bin/getopt to avoid any issues that could arise
> by calling the system’s getopt.
>
> What do you think about this?
> Pro
>
> 1. Avoids run-time check for brew etc.
> 2. Avoids assumptions about where brew etc. actually installs
> gnu-getopt.
> 3. Allows user to have multiple package managers without pass trying
> to use gnu-getopt from the “wrong” one.
>
> Con
>
> 1. Each package manager will need to patch platform/darwin.sh
>
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20190926/d2badb38/attachment.html>
More information about the Password-Store
mailing list