Cache: Only cache info if the info exists
This commit is contained in:
parent
99c0abc820
commit
8193bd6313
1 changed files with 4 additions and 2 deletions
6
neofetch
6
neofetch
|
@ -2800,8 +2800,10 @@ bar() {
|
|||
}
|
||||
|
||||
cache() {
|
||||
mkdir -p "${cache_dir}/neofetch"
|
||||
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
|
||||
if [[ "$2" ]]; then
|
||||
mkdir -p "${cache_dir}/neofetch"
|
||||
printf "%s" "${1/*-}=\"$2\"" > "${cache_dir}/neofetch/${1/*-}"
|
||||
fi
|
||||
}
|
||||
|
||||
get_cache_dir() {
|
||||
|
|
Loading…
Reference in a new issue