From 73988063450ca370b8385b473a4d4682b725510e Mon Sep 17 00:00:00 2001 From: Malte Poll <1780588+malt3@users.noreply.github.com> Date: Sun, 1 Dec 2024 03:26:03 +0100 Subject: [PATCH] set correct cache dir on macOS --- tools/credential-helper | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/credential-helper b/tools/credential-helper index 8e308bd..84c3f6a 100755 --- a/tools/credential-helper +++ b/tools/credential-helper @@ -40,7 +40,12 @@ install_base_hash() { fi } -cache_dir="${HOME}/.cache" +case "$(uname -s)" in + Linux*) cache_dir="${HOME}/.cache";; + Darwin*) cache_dir="${HOME}/Library/Caches";; + *) echo "Unknown OS $(uname -s) >&2"; exit 1;; +esac + if [ -n "${TEST_TMPDIR}" ]; then cache_dir="${TEST_TMPDIR}" fi