From 784e019f5826fc8d1191b06908bd15d5bfda23ec Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Sat, 13 May 2017 10:30:13 +0200 Subject: [PATCH] Handle it better --- check_config/config.json | 2 +- check_config/run.sh | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/check_config/config.json b/check_config/config.json index 806ce5d..8e2980b 100644 --- a/check_config/config.json +++ b/check_config/config.json @@ -1,6 +1,6 @@ { "name": "Check HomeAssistant config", - "version": "0.1", + "version": "0.2", "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 c50b99b..58c0018 100644 --- a/check_config/run.sh +++ b/check_config/run.sh @@ -22,4 +22,11 @@ fi echo "[INFO] Install done, check config now" -exec hass -c /config --script check_config +cp -r /config /tmp/config > /dev/null +if ! HASS_OUTPUT="$(hass -c /tmp/config --script check_config)" +then + echo "[ERROR] Wrong config found: $HASS_OUTPUT" + exit 1 +fi + +echo "[INFO] Okay :)"