Skip to content

Commit

Permalink
No need to cat files to jq
Browse files Browse the repository at this point in the history
Reminder from shellcheck:
```
SC2002 (style): Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
```
  • Loading branch information
eest committed Dec 30, 2024
1 parent 319c129 commit 3f9e62b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions local-dev/keycloak/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ set -eu

base_url="http://localhost:8080"

realm=$(cat keycloak-realm.json | jq -r .realm)
user=$(cat keycloak-user.json | jq -r .username)
realm=$(jq -r .realm keycloak-realm.json)
user=$(jq -r .username keycloak-user.json)

# Make it so we can run the script from anywhere
cd "$(dirname "$0")"
Expand Down Expand Up @@ -62,7 +62,7 @@ oidc_server_client_secret=$(curl -s -X GET \
-H "Authorization: bearer $access_token" \
"$base_url/admin/realms/$realm/clients/$server_client_id/client-secret" | jq -r .value)

oidc_server_client_id=$(cat keycloak-server-client.json | jq -r .clientId)
oidc_server_client_id=$(jq -r .clientId keycloak-server-client.json)

echo "Creating oauth2 public client for requesting device grants"
curl -X POST \
Expand Down

0 comments on commit 3f9e62b

Please sign in to comment.