bootstrap.sh: use exact match instead of substring when checking user id existence
Some checks failed
Rust / pre_job (push) Has been cancelled
Rust / cargo test (push) Has been cancelled
Rust / cargo clippy (push) Has been cancelled
Rust / cargo fmt (push) Has been cancelled
Rust / Code coverage (push) Has been cancelled

Signed-off-by: Binh-Nguyen Tran <tbnguyen1407@gmail.com>
This commit is contained in:
Binh-Nguyen Tran 2024-07-20 17:07:51 +08:00 committed by GitHub
parent 6eb5b959bf
commit b33d56a459
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -252,7 +252,7 @@ get_users_list() {
}
user_exists() {
if [[ "$(get_users_list | jq --raw-output --arg id "$1" '.data.users | any(.[]; contains({"id": $id}))')" == 'true' ]]; then
if [[ "$(get_users_list | jq --raw-output --arg id "$1" '.data.users | any(.[]; .id == $id)')" == 'true' ]]; then
return 0
else
return 1