Skip to content

Commit

Permalink
replace python with jq
Browse files Browse the repository at this point in the history
  • Loading branch information
thedannywahl committed Jul 13, 2019
1 parent b337b50 commit e9e916e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions studio/studio
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ if [ $? -gt 0 ]; then
printf >&2 "Unable to generate a session. Please ensure that your credentials are accurate.\r\n"
exit 2
fi
token=$(echo "$session" | python -c 'import sys, json; print json.load(sys.stdin)["session"]["token"]')
token=$(echo "$session" | jq -r .session.token)
if [ $? -gt 0 ]; then
printf >&2 "Unable to find session token.\r\n"
exit 2
fi
userid=$(echo "$session" | python -c 'import sys, json; print json.load(sys.stdin)["session"]["user"]["id"]')
userid=$(echo "$session" | [jq -r .session.user.id)
if [ $? -gt 0 ]; then
printf >&2 "Unable to find session userid.\r\n"
exit 2
Expand Down

0 comments on commit e9e916e

Please sign in to comment.