From 85a0e8666af702a504a2f65fffb90b245c555731 Mon Sep 17 00:00:00 2001 From: francoism90 Date: Thu, 10 Sep 2026 15:43:40 +0200 Subject: [PATCH] Set TMPDIR to $XDG_RUNTIME_DIR/app/com.visualstudio.code /tmp is always a private, sandbox-local tmpfs in Flatpak regardless of --filesystem=host, so Node's os.tmpdir() (used by the devcontainers CLI) writes build contexts there where the host-side podman (run via host-spawn) can't see them. $XDG_RUNTIME_DIR/app/ is the directory Flatpak actually shares with the host for this purpose, per the Flatpak sandbox-permissions docs. Cherry-picked from flathub/com.visualstudio.code#606, fixes flathub#605. Co-Authored-By: Claude Sonnet 5 --- code.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/code.sh b/code.sh index e8e63f4f..c449052f 100755 --- a/code.sh +++ b/code.sh @@ -65,6 +65,7 @@ if [ ! -e /etc/shells ] && [ -e /var/run/host/etc/shells ]; then fi exec env ELECTRON_RUN_AS_NODE=1 PATH="${PATH}:${XDG_DATA_HOME}/node_modules/bin" \ + TMPDIR="$XDG_RUNTIME_DIR/app/${FLATPAK_ID:-com.visualstudio.code}" \ /app/bin/zypak-wrapper.sh /app/extra/vscode/code /app/extra/vscode/resources/app/out/cli.js \ --extensions-dir=${XDG_DATA_HOME}/vscode/extensions \ "$@" ${WARNING_FILE}