Move env_var_exist first usage after the function is defined

This commit is contained in:
JSTayco 2023-03-29 11:11:10 -07:00
parent 9257f1dd05
commit 9a9976bb1c

View File

@ -57,10 +57,6 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
root=false
fi
if env_var_exists RUNPOD_POD_ID || env_var_exists RUNPOD_API_KEY; then
RUNPOD=true
fi
env_var_exists() {
local env_var=
env_var=$(declare -p "$1")
@ -116,6 +112,10 @@ if [[ "$OSTYPE" == "linux-gnu"* ]]; then
fi
}
if env_var_exists RUNPOD_POD_ID || env_var_exists RUNPOD_API_KEY; then
RUNPOD=true
fi
# This is the pre-install work for a kohya installation on a runpod
if [ "$RUNPOD" = true ]; then
if [ -d "$VENV_DIR" ]; then