Skip to content

Commit 50eb609

Browse files
authored
fix: skip installing packages when nothing to install (#6)
this changeset is to fix the issues related to installing packages. - treat packages as string instead of array of strings https://containers.dev/implementors/features/#options-property - replace commas (`,`) to spaces (` `)
1 parent 5e4c59d commit 50eb609

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/deno/install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ EXE="${BIN_DIR}/deno"
6161

6262
# Install global packages if specified
6363
# See https://docs.deno.com/runtime/reference/cli/install/#global-installation
64-
if [ "${#PACKAGES[@]}" -gt 0 ]; then
64+
if [ -n "${PACKAGES}" ]; then
6565
echo "Installing global packages..."
66+
# Replace commas to spaces.
67+
PACKAGES=${PACKAGES//,/ }
6668
su "${_REMOTE_USER}" -c "$EXE install --global --allow-net --allow-read ${PACKAGES}"
6769
fi
6870

0 commit comments

Comments
 (0)