Effort free video editing!
Catch only the errors cache and bar's clock lookup expect
WyattBlue6c07d6e169e5
diff --git a/src/cmds/cache.nim b/src/cmds/cache.nimindex a3ded4fe..7a8c8203 100644--- a/src/cmds/cache.nim+++ b/src/cmds/cache.nim@@ -15,7 +15,7 @@ proc main*(args: seq[string]) =if positionals.len > 0 and positionals[0] in ["clean", "clear"]:try: removeDir cacheDir- except: discard+ except OSError as e: error &"Could not clear the cache: {e.msg}"returnvar totalSize: BiggestInt = 0@@ -36,7 +36,7 @@ proc main*(args: seq[string]) =stdout.write "\e[90m", hashPart, "\e[0m"stdout.styledWriteLine(restPart, " ", fgYellow, "size: ", fgGreen, sizeNum,fgBlue, sizeUnit, resetStyle)- except:+ except OSError, IOError:discardif totalSize == 0:diff --git a/src/util/bar.nim b/src/util/bar.nimindex 04ddea83..b14acbf7 100644--- a/src/util/bar.nim+++ b/src/util/bar.nim@@ -184,7 +184,7 @@ proc initBar*(barType: BarType): Bar =try:let (dateFormat, _) = execCmdEx("defaults read com.apple.menuextra.clock Show24Hour")ampm = dateFormat == "0\n"- except:+ except OSError, IOError:discardlet config = BarConfig(icon: icon, chars: chars, brackets: brackets,