Commit 8193bd63 authored by Dylan Araps's avatar Dylan Araps

Cache: Only cache info if the info exists

parent 99c0abc8
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment