From 5002276abe29615388f38565f6e450f420fbc246 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 24 Nov 2020 00:42:07 +0100 Subject: [PATCH] v6.34 + DietPi-Software | Home Assistant: Error handle pyenv install --- dietpi/dietpi-software | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f59bd90c02..268c67ef85 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -6321,7 +6321,7 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u # Generate script to activate pyenv: This must be sourced from the originating shell, hence it does not require execute permissions. echo "#!/bin/dash -if [ \$(whoami) != $ha_user ]; then +if [ \$(whoami) != '$ha_user' ]; then echo '[FAILED] This pyenv must be activated as user \"$ha_user\". Aborting...' kill -INT \$\$ fi @@ -6329,16 +6329,16 @@ cd $ha_home export PATH=\"$ha_home/.pyenv/bin:\$PATH\" eval \"\$(pyenv init -)\"" > $ha_home/pyenv-activate.sh - # Install Python with Home Assistant module into pyenv + G_EXEC_DESC='Installing Python with Home Assistant module into pyenv' # - Read custom Python modules local custom_pip_deps=$(sed -n '/^[[:blank:]]*SOFTWARE_HOMEASSISTANT_PIP_DEPS=/{s/^[^=]*=//p;q}' /boot/dietpi.txt) # - MariaDB support: pip3 install mysqlclient|PyMySQL - sudo -u $ha_user dash -c " + G_EXEC_OUTPUT=1 G_EXEC sudo -u $ha_user dash -c " $ha_pyenv_activation pyenv install $ha_python_version pyenv local $ha_python_version pip3 install -U pip wheel -[ -z \"$custom_pip_deps\" ] || pip3 install $custom_pip_deps +[ -z '$custom_pip_deps' ] || pip3 install $custom_pip_deps exec pip3 install homeassistant" # Generate script to launch HA using pyenv