Hi, First of all, thanks for this simple and easy way to securely share password across our team (and have an inventory of them)
I spotted a bug that makes bash hitting 100% cpu
to reproduce this issue :
export PATH=/usr/bin:/bin:/usr/sbin:/sbin
/usr/local/bin/pass ls
/usr/local/bin/pass: line 350: /usr/local/bin/getopt: No such file or
directory
# 100 % cpu
Killed: 9
adding a `set -x` points me to :
/usr/local/bin/pass: line 352: /usr/local/bin/getopt: No such file or
directory
so I fixed the getopt PATH in src/platform/darwin.sh (as `brew --prefix
gnu-getopt` returns : "/usr/local/opt/gnu-getopt”, but as brew isn’t in the
PATH...):
-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null &&
echo /opt/local; } || echo /usr/local)/bin/getopt"
+GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null &&
echo /opt/local; } || echo /usr/local/opt/gnu-getopt)/bin/getopt”
Launched `/usr/local/bin/pass ls` again :
/usr/local/bin/pass: line 385: tree: command not found
same issue with gpg not in the PATH:
/usr/local/bin/pass show lists.zx2c4.com/[email protected]
/usr/local/bin/pass: line 367: gpg: command not found
Fixed by adding a TREE var to password-store.sh, and fixing them by adding in
src/platform/darwin.sh :
+GPG="$(which gpg)"
+[[ -z "$TREE" ]] && TREE="/usr/local/bin/gpg"
+TREE="$(which tree)"
+[[ -z "$TREE" ]] && TREE="/usr/local/bin/tree”
Regards
0001-Fix-infinite-loop-on-darwin.patch
Description: Binary data
