From ccfa38096ee15a4aa858a423eb57fa0e1c629a8a Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Mon, 31 Jul 2017 17:13:01 +0200 Subject: [PATCH] Config check: Fix grep for Errors on stdout (#158) * Update run.sh * remove tzdata while it is on base image * Update config.json --- check_config/Dockerfile | 2 +- check_config/config.json | 2 +- check_config/run.sh | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/check_config/Dockerfile b/check_config/Dockerfile index 3b5350a..b110f62 100644 --- a/check_config/Dockerfile +++ b/check_config/Dockerfile @@ -4,7 +4,7 @@ FROM %%BASE_IMAGE%% ENV LANG C.UTF-8 # Setup base -RUN apk add --no-cache tzdata jq python3 \ +RUN apk add --no-cache jq python3 \ && pip3 install --no-cache --upgrade pip # Copy data diff --git a/check_config/config.json b/check_config/config.json index bab9c93..387020a 100644 --- a/check_config/config.json +++ b/check_config/config.json @@ -1,6 +1,6 @@ { "name": "Check HomeAssistant config", - "version": "0.6", + "version": "0.7", "slug": "check_config", "description": "Check HomeAssistant config with a new version", "url": "https://home-assistant.io/addons/check_config/", diff --git a/check_config/run.sh b/check_config/run.sh index fda074b..8f21411 100644 --- a/check_config/run.sh +++ b/check_config/run.sh @@ -16,25 +16,25 @@ echo "[INFO] Start install HomeAssistant $VERSION" if ! PIP_OUTPUT="$(pip3 install "$CMD")" then - echo "[ERROR] Install HomeAssistant: $PIP_OUTPUT" + echo "[Error] Install HomeAssistant: $PIP_OUTPUT" exit 1 fi -echo "[INFO] Install done, check config now" +echo "[Info] Install done, check config now" cp -r /config /tmp/config > /dev/null if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)" then - echo "[ERROR] Wrong config found!" + echo "[Error] Wrong config found!" echo "$HASS_OUTPUT" exit 1 fi -if echo "$HASS_OUTPUT" | grep ERROR > /dev/null +if echo "$HASS_OUTPUT" | grep -i ERROR > /dev/null then - echo "[ERROR] Wrong yaml found!" + echo "[Error] Found error inside log output!" echo "$HASS_OUTPUT" exit 1 fi -echo "[INFO] Finish :)" +echo "[Info] Finish :)"