<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="">Ran into an issue where <div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><font face="Courier" class="">echo "password" | pass insert foo/bar/baz </font></div></blockquote><div class=""><br class=""></div><div class="">was in shell code.. and ran but:</div><div class=""><div class=""> - should have had '-e' expressly on the C/L </div></div><div class=""> - created ~/.password-store/foo/bar .. but no baz.gpg</div><div class=""> - returned no visible error because the read's tromped the input lines</div><div class=""><br class=""></div><div class="">Was frustrating to review the code using sh -xv and see what transpired. A simple fix offered for this:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class=""><font face="Courier" class="">> git diff master</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">diff --git a/src/password-store.sh b/src/password-store.sh</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">index 77f3eda..ed7927a 100755</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">--- a/src/password-store.sh</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">+++ b/src/password-store.sh</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">@@ -459,6 +459,9 @@ cmd_insert() {</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class=""> echo</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class=""> $GPG -e "${GPG_RECIPIENT_ARGS[@]}" -o "$passfile" "${GPG_OPTS[@]}" || die "Password encryption aborted."</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class=""> elif [[ $noecho -eq 1 ]]; then</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">+ if ! [[ -t 0 ]]; then</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">+ die "use -e if not interactive"</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class="">+ fi</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class=""> local password password_again</font></div></div></div><div class=""><div class=""><div class=""><font face="Courier" class=""> while true; do</font></div></div></div><div class=""><div class=""><div><font face="Courier" class=""> read -r -p "Enter password for $path: " -s password || exit 1</font></div></div></div></blockquote><div class=""><div class=""><div><br class=""></div><div><br class=""></div><div>Happy days.</div><div> </div><div> -b </div><div>branson matheson</div><div><a href="mailto:branson@sandsite.org" class="">branson@sandsite.org</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>