<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class=""><span style="font-family: sans-serif;" class="">The only thing that annoys me with the code above is that we always execute </span><code bgcolor="#F7F7F7" class="" style="background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; margin: 0px; padding: 0px 0.4em;">brew</code><span style="font-family: sans-serif;" class="">, though technically the overhead is the same or less than guarding it with a </span><code bgcolor="#F7F7F7" class="" style="background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; margin: 0px; padding: 0px 0.4em;">command -v brew</code><span style="font-family: sans-serif;" class=""> statement (less for people who have the executable).</span></div></blockquote></div><br class=""><div class="">Okay, I see your point. Maybe we can ditch this all together? As far as I can see from the documentation (<a href="https://docs.brew.sh/Installation" class="">https://docs.brew.sh/Installation</a>), there are about no chances that the brew prefix is not<font face="Menlo" class=""> /usr/local</font>.</div><div class="">It requires similar steps as for macports (<a href="https://www.macports.org/install.php" class="">https://www.macports.org/install.php</a>) to install brew somewhere else then in its default path. But for macports,<font face="Menlo" class=""> pass </font>assumes the default path anyway, so we could do this for brew, could we?</div><div class="">Additionally, this is a somewhat failsafe version. If neither of the three options is available the user will have trouble using<font face="Menlo" class=""> pass </font>anyways, so the<font face="Menlo" class=""> test -x </font>check should be enough.</div><div class=""><br class=""></div><div class="">A patch based on Allans suggestions is appended.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><font face="Menlo" class="">diff --git a/src/platform/darwin.sh b/src/platform/darwin.sh</font></div><div class=""><font face="Menlo" class="">index 342ecce..a984bec 100644</font></div><div class=""><font face="Menlo" class="">--- a/src/platform/darwin.sh</font></div><div class=""><font face="Menlo" class="">+++ b/src/platform/darwin.sh</font></div><div class=""><font face="Menlo" class="">@@ -43,6 +43,10 @@ qrcode() {</font></div><div class=""><font face="Menlo" class="">        fi</font></div><div class=""><font face="Menlo" class=""> }</font></div><div class=""><font face="Menlo" class=""><br class=""></font></div><div class=""><font face="Menlo" class="">-GETOPT="$(brew --prefix gnu-getopt 2>/dev/null || { which port &>/dev/null && echo /opt/local; } || echo /usr/local)/bin/getopt"</font></div><div class=""><font face="Menlo" class="">+for prefix in /usr/local/opt/gnu-getopt /opt/local /usr/local; do</font></div><div class=""><font face="Menlo" class="">+    GETOPT="${prefix}/bin/getopt"</font></div><div class=""><font face="Menlo" class="">+    test -x "$GETOPT" && break</font></div><div class=""><font face="Menlo" class="">+done</font></div><div class=""><font face="Menlo" class="">+</font></div><div class=""><font face="Menlo" class=""> SHRED="srm -f -z"</font></div><div class=""><font face="Menlo" class=""> BASE64="openssl base64"</font></div></div></body></html>