From ad9c20dc55b08e60add4d18e03cb4b997ad9a2a5 Mon Sep 17 00:00:00 2001 From: Juan Puerto <=> Date: Wed, 14 Feb 2024 13:54:37 -0500 Subject: [PATCH] Jobs: Check the environment name to make sure that we are avoiding double dots in the VENV_PATH --- .../templates/script_templates/jupyter_lab_template.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/user_workspaces_server/templates/script_templates/jupyter_lab_template.sh b/src/user_workspaces_server/templates/script_templates/jupyter_lab_template.sh index 60545a1..26ea3ea 100644 --- a/src/user_workspaces_server/templates/script_templates/jupyter_lab_template.sh +++ b/src/user_workspaces_server/templates/script_templates/jupyter_lab_template.sh @@ -1,6 +1,6 @@ #!/bin/bash -### TODO: Modify this to make sure we aren't doing double dots in the name -VENV_PATH="{{ workspace_full_path }}/.{{ environment_name }}_venv" +[[ {{ environment_name }} == .* ]] && ENV_NAME="{{ environment_name }}" || ENV_NAME=".{{ environment_name }}" +VENV_PATH="{{ workspace_full_path }}/${ENV_NAME}_venv" echo "STARTED @ $(date)" ### Environment initialization