Skip to content

Commit 2b06a7f

Browse files
Additional fixes
- use Bash - wordsplit PACKAGES input into array - pass array to `apt`
1 parent b20ee2d commit 2b06a7f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/apt-packages/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "APT Packages",
33
"id": "apt-packages",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"description": "Install programs using the APT package manager.",
66
"options": {
77
"packages": {

src/apt-packages/install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/usr/bin/env sh
1+
#!/usr/bin/env bash
22

33
set -e
44

5-
apt update
5+
read -ar packages <<< "${PACKAGES:-""}"
66

7-
# shellcheck disable=SC2154
8-
apt install --no-install-recommends --yes "${PACKAGES}"
7+
apt update
8+
apt install --no-install-recommends --yes "${packages[@]}"
99

1010
rm -rf /var/lib/apt/lists /var/cache/apt/archives

0 commit comments

Comments
 (0)