Skip to content

Commit

Permalink
Merge pull request #197 from nmfs-opensci/eeholmes-patch-2
Browse files Browse the repository at this point in the history
cleanup --extensions-dir
  • Loading branch information
eeholmes authored Nov 19, 2024
2 parents 7e2972f + 494b69c commit 71bc653
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/install-vscode-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 71bc653

Please sign in to comment.