Closed SuperSandro2000 closed 4 years ago
# (in test file /bash/test/segments/wttr.bats, line 30)
# `[[ -f "$SEGMENT_CACHE" ]]' failed
#
# [20.08.07 06:12:10] [wttr.bash - segments::wttr_refresh]: No cache folder
# /bash/src/segments/wttr.bash: line 25: curl: command not found
Not sure why the tests complain about a missing curl.
Not sure, but I'll take a closer look, and I think I'll start using shfmt for the entire code base btw. Looks like a good compliment to shellcheck.
JFYI: I used shfmt -ci -i 2 -s -w
to format this file.
If you have no internet connection and the wttr.in segment gets refreshed it will be an empty segment (only the arrow) until it gets refreshed again.
This checks if the response by wttr.in is empty and does not attempt to write whitespace to the cache.