From d1b7eef72b24ee2c220cf7bb7facde71efb6137d Mon Sep 17 00:00:00 2001 From: Morten Rasmussen Date: Wed, 27 Apr 2016 10:12:49 +0100 Subject: [PATCH] Fix LISA-shell paths lisa-help only works when called from the LISA root folder. Fix this by storing LISA_HOME correctly and add a useful error message if someone tries to initialize the LISA-shell outside the LISA root folder. Signed-off-by: Morten Rasmussen --- init_env | 3 +++ src/shell/lisa_shell | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/init_env b/init_env index d5119ab97..e2971b7b1 100644 --- a/init_env +++ b/init_env @@ -20,6 +20,9 @@ grep "bash" /proc/$$/cmdline &>/dev/null if [ $? -eq 0 ]; then source ./src/shell/lisa_shell + if [ ! $? -eq 0 ]; then + echo "ERROR: LISA must be initialized from the LISA home folder." + fi else echo "WARNING: Current shell is not a BASH" # Check if a bash shell is available diff --git a/src/shell/lisa_shell b/src/shell/lisa_shell index 3b8098d54..bb708e3c3 100644 --- a/src/shell/lisa_shell +++ b/src/shell/lisa_shell @@ -25,7 +25,7 @@ source src/shell/lisa_colors DEVMODE=${DEVMODE:-1} # Get base installation path of LISA -LISA_HOME="$(pwd)" +LISA_HOME=$(pwd) export PYTHONPATH='' export PYTHONPATH=$LISA_HOME/libs/utils:$PYTHONPATH -- GitLab