On 26 Oct 2018, at 12:12, [email protected] 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
[email protected]
https://lists.zx2c4.com/mailman/listinfo/password-store

Reply via email to