Fix contrib/seed.sh script
`jo -a` is waiting on stdin; adding `< /dev/null` allows to generate an empty array without waiting on stdin.D Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -26,7 +26,6 @@ FULL_NAME="Seed Admin"
|
||||
ORG_NAME="Acme Corp"
|
||||
|
||||
# Helpers
|
||||
|
||||
gql_connect() {
|
||||
local query="$1"
|
||||
local variables="${2:-"{}"}"
|
||||
@@ -60,6 +59,9 @@ prb_api() {
|
||||
echo "$resp"
|
||||
}
|
||||
|
||||
curl -sf -o /dev/null "$BASE_URL/healthz" \
|
||||
|| { echo "ERROR: API at $BASE_URL is not available" >&2; exit 1; }
|
||||
|
||||
echo "==> Bootstrapping user and organization..."
|
||||
vars=$(jo input="$(jo \
|
||||
email="$EMAIL" \
|
||||
@@ -144,7 +146,7 @@ create_person() {
|
||||
fullName="$full_name" \
|
||||
role=EMPLOYEE \
|
||||
kind=EMPLOYEE \
|
||||
additionalEmailAddresses="$(jo -a)" \
|
||||
additionalEmailAddresses="$(jo -a < /dev/null)" \
|
||||
position="$position" \
|
||||
)")
|
||||
resp=$(gql_connect '
|
||||
|
||||
Reference in New Issue
Block a user