Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

shuttle: set XDG_CACHE_HOME to while running user steps

prevent the service level one from leaking into the steps

Signed-off-by: dawn <dawn@tangled.org>

dawn (Jul 5, 2026, 10:39 PM +0300) 76299b87 bce1d790

+10
+5
shuttle/src/exec.rs
··· 125 125 126 126 impl ResolvedUser { 127 127 fn login_env(&self) -> Vec<(OsString, OsString)> { 128 + let xdg_cache_home = PathBuf::from(&self.home).join(".cache"); 128 129 vec![ 129 130 (OsString::from("USER"), OsString::from(&self.name)), 130 131 (OsString::from("LOGNAME"), OsString::from(&self.name)), 131 132 (OsString::from("HOME"), self.home.clone()), 133 + ( 134 + OsString::from("XDG_CACHE_HOME"), 135 + xdg_cache_home.into_os_string(), 136 + ), 132 137 (OsString::from("SHELL"), self.shell.clone()), 133 138 ] 134 139 }
+5
spindle/engines/microvm/test-spindle-microvm.sh
··· 643 643 env_file=/run/spindle/devshell-env.sh 644 644 [ -f "$env_file" ] && echo "env_file=present" || echo "env_file=missing" 645 645 echo "shuttle_env=$(systemctl show shuttle -p Environment --value)" 646 + echo "step_xdg_cache_home=${XDG_CACHE_HOME:-unset}" 647 + mkdir -p "$XDG_CACHE_HOME/go-build" 648 + [ -w "$XDG_CACHE_HOME/go-build" ] && echo "go_build_cache_writable=yes" 646 649 if [ -d /var/cache/shuttle ] && [ "$(stat -c %d /var/cache/shuttle)" = "$(stat -c %d /workspace)" ]; then 647 650 echo "shuttle_cache_on_persist=yes" 648 651 else ··· 684 687 685 688 check_needles "$out" \ 686 689 "env_file=present" "shuttle_env=.*XDG_CACHE_HOME=/var/cache/shuttle" \ 690 + "step_xdg_cache_home=/workspace/.cache" "go_build_cache_writable=yes" \ 687 691 "shuttle_cache_on_persist=yes" "shuttle_nix_cache_written=yes" \ 688 692 "pkgconfig=[0-9]" "openssl_found=yes" "openssl_version=[0-9]" \ 689 693 "dev_headers=found" "hello=Hello, world!" || return 1 ··· 697 701 check_needles "$out" \ 698 702 "realizing cached NixOS config" \ 699 703 "env_file=present" "shuttle_env=.*XDG_CACHE_HOME=/var/cache/shuttle" \ 704 + "step_xdg_cache_home=/workspace/.cache" "go_build_cache_writable=yes" \ 700 705 "shuttle_cache_on_persist=yes" "pkgconfig=[0-9]" "openssl_found=yes" \ 701 706 "openssl_version=[0-9]" "dev_headers=found" "hello=Hello, world!" || return 1 702 707 echo "success: cache-hit run re-read the devshell env from the cached profile (no drv) and all deps resolved"