Skip to content

Commit

Permalink
Throw warning when 1password-cli is not installed.
Browse files Browse the repository at this point in the history
  • Loading branch information
drn committed Jan 4, 2022
1 parent f84221c commit 16c5608
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/1pass
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

# Authenticate 1pass CLI if no existing session is initialized

if ! command -v op > /dev/null; then
echo -e '\033[1;31m1password-cli is not installed\033[0m'
return 1
fi

if [ -z "$OP_SESSION_my" ]; then
eval "$(op signin my 2>/dev/null)"
fi

0 comments on commit 16c5608

Please sign in to comment.