Skip to content

Commit addad6c

Browse files
authored
Merge pull request ceph#56513 from rosinL/wip-fix-65175
install-deps: save and restore user's XDG_CACHE_HOME
2 parents c46a99d + a173421 commit addad6c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

install-deps.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,9 @@ fi
541541
if $for_make_check; then
542542
mkdir -p install-deps-cache
543543
top_srcdir=$(pwd)
544+
if [ -n "$XDG_CACHE_HOME" ]; then
545+
ORIGINAL_XDG_CACHE_HOME=$XDG_CACHE_HOME
546+
fi
544547
export XDG_CACHE_HOME=$top_srcdir/install-deps-cache
545548
wip_wheelhouse=wheelhouse-wip
546549
#
@@ -551,6 +554,11 @@ if $for_make_check; then
551554
done
552555
rm -rf $top_srcdir/install-deps-python3
553556
rm -rf $XDG_CACHE_HOME
557+
if [ -n "$ORIGINAL_XDG_CACHE_HOME" ]; then
558+
XDG_CACHE_HOME=$ORIGINAL_XDG_CACHE_HOME
559+
else
560+
unset XDG_CACHE_HOME
561+
fi
554562
type git > /dev/null || (echo "Dashboard uses git to pull dependencies." ; false)
555563
fi
556564

0 commit comments

Comments
 (0)