You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first setting looks like a "complete" bug - the ccache manual has clear details on how it finds ccache.conf and setting it here skips steps 1-3 of its algorithm.
The second setting should be guarded with local to stop any change to the variable leaking to the exec call.
While we're there, the dance with a for loop can be much more simply converted to:
local CCACHE_DIR="$(ccache --print-config 2>/dev/null | sed -n -e 's/cache_dir = //p')"test -z "$CCACHE_DIR"|| add_mounts rw "$CCACHE_DIR"
that should then have the desired effect that cache_dir is read-write in the sandbox!
Let's have a look at add_ccache_mount() function in ${HOME}/.opam/opam-init/hooks/sandbox.sh
$CCACHE_DIR is used by ccache to customize ccache directory, and it's overwritten here by
CCACHE_DIR=$HOME/.ccache
and
CCACHE_DIR=${BASH_REMATCH[1]}
So the environment variable I set before has no effect here.
The shell variable CCACHE_DIR should be renamed to avoid confliction.
The text was updated successfully, but these errors were encountered: