From cf0d975ae36fb436add656e7382c27be07c3e1a2 Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Mon, 18 Nov 2024 16:18:21 -0800 Subject: [PATCH 1/2] add --extensions-dir to --install --- scripts/install-vscode-extensions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install-vscode-extensions.sh b/scripts/install-vscode-extensions.sh index d732b64..d624d93 100644 --- a/scripts/install-vscode-extensions.sh +++ b/scripts/install-vscode-extensions.sh @@ -30,8 +30,8 @@ if [ ! -f "${ext_file}" ]; then fi # Set the extensions directory to be the conda dir so that it persists -mkdir -p ${NB_PYTHON_PREFIX}/share/code-server/extensions -${NB_PYTHON_PREFIX}/bin/code-server --extensions-dir ${NB_PYTHON_PREFIX}/share/code-server/extensions +EXT_DIR=${NB_PYTHON_PREFIX}/share/code-server/extensions +mkdir -p ${EXT_DIR} # Install each extension listed in the file; skip empty lines or comments while IFS= read -r EXT; do @@ -41,7 +41,7 @@ while IFS= read -r EXT; do # Skip if the line is now empty [[ -z "$EXT" ]] && continue - if ${NB_PYTHON_PREFIX}/bin/code-server --install-extension "$EXT"; then + if ${NB_PYTHON_PREFIX}/bin/code-server --extensions-dir ${EXT_DIR} --install-extension "$EXT"; then echo " Successfully installed extension: $EXT" else echo " Failed to install extension: $EXT" >&2 From 494b69c2c409e0e24f011ec72b32c27622b2a31d Mon Sep 17 00:00:00 2001 From: Eli Holmes - NOAA Date: Mon, 18 Nov 2024 18:59:52 -0800 Subject: [PATCH 2/2] Update install-vscode-extensions.sh --- scripts/install-vscode-extensions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install-vscode-extensions.sh b/scripts/install-vscode-extensions.sh index d624d93..acc6733 100644 --- a/scripts/install-vscode-extensions.sh +++ b/scripts/install-vscode-extensions.sh @@ -30,8 +30,8 @@ if [ ! -f "${ext_file}" ]; then fi # Set the extensions directory to be the conda dir so that it persists -EXT_DIR=${NB_PYTHON_PREFIX}/share/code-server/extensions -mkdir -p ${EXT_DIR} +EXT_DIR="${NB_PYTHON_PREFIX}/share/code-server/extensions" +mkdir -p "${EXT_DIR}" # Install each extension listed in the file; skip empty lines or comments while IFS= read -r EXT; do @@ -41,7 +41,7 @@ while IFS= read -r EXT; do # Skip if the line is now empty [[ -z "$EXT" ]] && continue - if ${NB_PYTHON_PREFIX}/bin/code-server --extensions-dir ${EXT_DIR} --install-extension "$EXT"; then + if ${NB_PYTHON_PREFIX}/bin/code-server --extensions-dir "${EXT_DIR}" --install-extension "$EXT"; then echo " Successfully installed extension: $EXT" else echo " Failed to install extension: $EXT" >&2