Skip to content

Commit bf4fd22

Browse files
chore: update Rust LLDB extension & make extension caching work on Alpine
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
1 parent a1b1fcd commit bf4fd22

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

src/lang-rust/devcontainer-feature.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ref: https://github.com/devcontainers/spec/blob/main/schemas/devContainerFeature.schema.json
22
{
33
"id": "lang-rust",
4-
"version": "0.1.6",
4+
"version": "0.1.7",
55
"name": "Programming Language | Rust",
66
"documentationURL": "https://github.com/georglauterbach/dev-container-features/tree/main/src/rust",
77
"description": "Work efficiently and effortlessly with Rust",
@@ -42,7 +42,7 @@
4242
// TOML language support
4343
"tamasfe.even-better-toml",
4444
// LLVM-based debugger (LLDB)
45-
"vadimcn.vscode-lldb@1.11.8"
45+
"vadimcn.vscode-lldb@1.12.1"
4646
],
4747
"settings": {
4848
// mark the directory for build-artifacts as read-only

src/vscode-cache-extensions/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// ref: https://github.com/devcontainers/spec/blob/main/schemas/devContainerFeature.schema.json
22
{
33
"id": "vscode-cache-extensions",
4-
"version": "0.1.0",
4+
"version": "0.2.0",
55
"name": "VS Code | Cache Extensions",
66
"documentationURL": "https://github.com/georglauterbach/dev-container-features/tree/main/src/vscode-cache-extensions",
77
"description": "Prevent superfluous (re-)installations of VS Code extensions upon container restarts",
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#! /bin/sh
22

3+
# This script uses the short flags (e.g., "-f") for commands instead of the
4+
# long flags (e.g. "--force") to work on Alpine and other distributions.
5+
36
# shellcheck disable=SC2154
47

58
set -e -u
@@ -12,20 +15,20 @@ if [ -z "${_REMOTE_USER_HOME:-}" ]; then
1215
fi
1316

1417
# We create the mount point and temporary directories here with the
15-
# correct permissions. This is especially imperative for the mount
16-
# point as the volume mount will cary over the _permissions_ of an
17-
# existing directory. We _cannot_ use `chown` here because of
18+
# correct permissions. This is imperative for the mount point as
19+
# the volume mount will cary over the _permissions_ of an existing
20+
# directory. We _cannot_ use `chown` here because of
1821
# `updateRemoteUserUID: true` in some cases, which would result in
1922
# a UID mismatch; hence, we need `777` as the permissions.
2023
for LOOP_VAR in "stable," "insiders,-insiders"; do
21-
PERSISTENCE_DIR="${CACHE_MOUNT_POINT}/$(printf '%s' "${LOOP_VAR}" | cut --delimiter=, --fields=1)"
24+
PERSISTENCE_DIR="${CACHE_MOUNT_POINT}/$(printf '%s' "${LOOP_VAR}" | cut -d , - 1)"
2225
TMP_STORAGE_DIR="${_REMOTE_USER_HOME}/.vscode-server$(printf '%s' "${LOOP_VAR}" | cut --delimiter=, --fields=2)"
2326

24-
mkdir --parents "${PERSISTENCE_DIR}" "${TMP_STORAGE_DIR}"
25-
chmod --recursive 777 "${PERSISTENCE_DIR}" "${TMP_STORAGE_DIR}"
27+
# shellcheck disable=SC2174
28+
mkdir -m 777 -p "${PERSISTENCE_DIR}" "${TMP_STORAGE_DIR}"
2629

2730
TMP_STORAGE_DIR=${TMP_STORAGE_DIR}/extensions
2831

29-
rm --recursive --force "${TMP_STORAGE_DIR}"
30-
ln --symbolic "${PERSISTENCE_DIR}" "${TMP_STORAGE_DIR}"
32+
rm -r -f "${TMP_STORAGE_DIR}"
33+
ln -s "${PERSISTENCE_DIR}" "${TMP_STORAGE_DIR}"
3134
done

0 commit comments

Comments
 (0)