From 625785375960e5d0c212fd984ac2e562c02d0872 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Fri, 18 Feb 2022 02:55:54 -0800 Subject: [PATCH] lib/utilities: use `$XDG_CACHE_HOME` properly We should fall back to the default location, not use an entirely different one. --- lib/utilities.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utilities.bash b/lib/utilities.bash index 60f15131..180d66f0 100644 --- a/lib/utilities.bash +++ b/lib/utilities.bash @@ -91,7 +91,7 @@ function _bash-it-component-help() { function _bash-it-component-cache-file() { local _component_to_cache _file_path _result="${2:-${FUNCNAME[0]//-/_}}" _bash-it-component-pluralize "${1?${FUNCNAME[0]}: component name required}" _component_to_cache - _file_path="${XDG_CACHE_HOME:-${BASH_IT?}/tmp/cache}${XDG_CACHE_HOME:+/bash_it}/${_component_to_cache?}" + _file_path="${XDG_CACHE_HOME:-${HOME?}/.cache}/bash/${_component_to_cache?}" [[ -f "${_file_path}" ]] || mkdir -p "${_file_path%/*}" printf -v "${_result?}" '%s' "${_file_path}" }