Fix CI warning "[: =~: binary operator expected" (#3470)

This commit is contained in:
Pascal Vizeli 2022-02-28 12:26:38 +01:00 committed by GitHub
parent 21a5479a2e
commit 205f3a74dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,13 +260,13 @@ jobs:
run: |
echo "Checking supervisor info"
test=$(docker exec hassio_cli ha supervisor info --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
echo "Checking supervisor network info"
test=$(docker exec hassio_cli ha network info --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
@ -274,13 +274,13 @@ jobs:
run: |
echo "Install Core SSH Add-on"
test=$(docker exec hassio_cli ha addons install core_ssh --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
echo "Start Core SSH Add-on"
test=$(docker exec hassio_cli ha addons start core_ssh --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
@ -289,25 +289,25 @@ jobs:
run: |
echo "Enable Content-Trust"
test=$(docker exec hassio_cli ha security options --content-trust=true --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
echo "Run supervisor health check"
test=$(docker exec hassio_cli ha resolution healthcheck --no-progress --raw-json | jq -r '.result')
if [ "$test" != "ok" ];then
if [ "$test" != "ok" ]; then
exit 1
fi
echo "Check supervisor unhealthy"
test=$(docker exec hassio_cli ha resolution info --no-progress --raw-json | jq -r '.data.unhealthy[]')
if [ "$test" != "" ];then
if [ "$test" != "" ]; then
exit 1
fi
echo "Check supervisor supported"
test=$(docker exec hassio_cli ha resolution info --no-progress --raw-json | jq -r '.data.unsupported[]')
if [ "$test" =~ source_mods ];then
if [[ "$test" =~ source_mods ]]; then
exit 1
fi