Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ if ! command -v ocm &>/dev/null; then
exit 1
fi

OCM_TOKEN=$(ocm token 2>/dev/null)

if [ $? -ne 0 ]; then
if ! OCM_TOKEN=$(ocm token 2>/dev/null); then
echo "You are not logged in to OCM. Please run 'ocm login --use-auth-code' and follow the instructions."
exit 1
elif [ -z "${OCM_TOKEN}" ]; then
Expand Down