Handle expired session key

This commit is contained in:
He4eT 2026-03-29 20:50:10 +02:00
commit 656699f9e6

12
bwc
View file

@ -67,7 +67,17 @@ main() {
# Get a list of matching items
echo "Searching for '$searchterm'..."
local logins=$(bw list items --search $searchterm --session $sessionkey)
local logins=$(bw list items \
--search "$searchterm" \
--session "$sessionkey" \
--nointeraction
)
if [[ -z $logins ]] ; then
sudo rm $sessionfile
echo "The existing session key is invalid and has been deleted."
exit 0
fi
# Pick one with the fzf
local id=$(