From d04e2c01390475144bf3533c4c9373e8e3534f3a Mon Sep 17 00:00:00 2001 From: Olivier Lemasle Date: Tue, 29 Jul 2025 23:39:25 +0200 Subject: [PATCH] Set TMPDIR to $XDG_RUNTIME_DIR/app/com.visualstudio.code This sets TMPDIR to a tmpfs directory shared between the Flatpak vscode and the host, which fixes an issue when using Devcontainers features. Note: TMPDIR is used by Node.js [`os.tmpdir()`](https://nodejs.org/api/os.html#ostmpdir) which is used by [devcontainers CLI](https://github.com/devcontainers/cli/tree/eda6cf892e1440d1fbb454d6e457a2343113ded6). --- code.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/code.sh b/code.sh index de8d0ec..4820649 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 \ --ms-enable-electron-run-as-node --extensions-dir=${XDG_DATA_HOME}/vscode/extensions \ "$@" ${WARNING_FILE}