Skip to content

Commit

Permalink
sandbox_exec.sh: Add missing quotes where required to avoid failures …
Browse files Browse the repository at this point in the history
…or unwanted behaviours with spaces
  • Loading branch information
kit-ty-kate committed Jul 18, 2020
1 parent d3aa1d4 commit 7efaeba
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/state/shellscripts/sandbox_exec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ if [ -z ${TMPDIR+x} ]; then
# directory differently; the latter should be made readable/writable
# too and getconf seems to be a robust way to get it
if [ -z /usr/bin/getconf ]; then
TMP=`getconf DARWIN_USER_TEMP_DIR`
add_mounts rw $TMP
TMP=$(getconf DARWIN_USER_TEMP_DIR)
add_mounts rw "$TMP"
fi
else
add_mounts rw $TMPDIR
add_mounts rw "$TMPDIR"
fi

# C compilers using `ccache` will write to a shared cache directory
Expand All @@ -44,14 +44,14 @@ add_ccache_mount() {
done
CCACHE_DIR=${CCACHE_DIR-$HOME/.ccache}
ccache_dir=${ccache_dir-$CCACHE_DIR}
add_mounts rw $ccache_dir
add_mounts rw "$ccache_dir"
fi
}

add_dune_cache_mount() {
DUNE_CACHE=${XDG_CACHE_HOME:-$HOME/.cache}/dune
mkdir -p ${DUNE_CACHE}
add_mounts rw $DUNE_CACHE
mkdir -p "${DUNE_CACHE}"
add_mounts rw "$DUNE_CACHE"
}

# This case-switch should remain identical between the different sandbox implems
Expand Down

0 comments on commit 7efaeba

Please sign in to comment.