Skip to content

Commit

Permalink
sandbox: respect the DUNE_CACHE_ROOT environment variable if it exists
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto authored and kit-ty-kate committed Dec 6, 2024
1 parent 75f9eec commit 400b2f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ users)
## Format upgrade

## Sandbox
* Respect the `DUNE_CACHE_ROOT` environment variable if it exists [#6326 @smorimoto]

## VCS

Expand Down
2 changes: 1 addition & 1 deletion src/state/shellscripts/bwrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ add_ccache_mount() {
}

add_dune_cache_mount() {
local dune_cache=${XDG_CACHE_HOME:-$HOME/.cache}/dune
local dune_cache=${DUNE_CACHE_ROOT:-${XDG_CACHE_HOME:-$HOME/.cache}/dune}
mount_linked_cache "$dune_cache"
}

Expand Down
2 changes: 1 addition & 1 deletion src/state/shellscripts/sandbox_exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ add_ccache_mount() {
}

add_dune_cache_mount() {
local dune_cache=${XDG_CACHE_HOME:-$HOME/.cache}/dune
local dune_cache=${DUNE_CACHE_ROOT:-${XDG_CACHE_HOME:-$HOME/.cache}/dune}
mkdir -p "${dune_cache}"
add_mounts rw "$dune_cache"
}
Expand Down

0 comments on commit 400b2f6

Please sign in to comment.