Skip to content

Commit

Permalink
lib/utilities: lint _bash-it-component-cache-file()
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelicWizard committed Sep 18, 2021
1 parent f659ee2 commit a891206
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/utilities.bash
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ function _bash-it-component-help()
cat "${file}"
}

_bash-it-component-cache-file() {
local component="$(_bash-it-pluralize-component "${1}")"
local file="${BASH_IT}/tmp/cache/${component}"
function _bash-it-component-cache-file() {
local component file
component="$(_bash-it-pluralize-component "${1}")"
file="${BASH_IT}/tmp/cache/${component}"
[[ -f "${file}" ]] || mkdir -p "${file%/*}"
printf '%s' "${file}"
}
Expand Down

0 comments on commit a891206

Please sign in to comment.