[PATCH 3/5] Infer gnu-getopt path using MacPorts
Artur Sterz
pass-maillinglist at artursterz.de
Tue Oct 30 18:06:26 CET 2018
Unlike using brew, the MacPorts default path is assumed when infering the path to gnu-getopts.
This should not be done, since it is possible to install MacPorts and the ports in
non-standard paths.
---
src/platform/darwin.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh
index bc232c3..1d9ac8f 100644
--- a/src/platform/darwin.sh
+++ b/src/platform/darwin.sh
@@ -45,7 +45,7 @@ qrcode() {
GETOPT="$(PATH="/usr/local/opt/gnu-getopt/bin:/opt/local/bin:/usr/local/bin" command -v getopt)" || \
GETOPT="$(brew --prefix 2>/dev/null)/opt/gnu-getopt/bin/getopt" || \
-GETOPT="$(which port &>/dev/null && echo /opt/local/bin/getopt)"
+GETOPT="$(port content getopt | grep -E '/s?bin/')"
SHRED="srm -f -z"
BASE64="openssl base64"
--
2.17.1 (Apple Git-112)
More information about the Password-Store
mailing list