bvaisvil / zenith

Zenith - sort of like top or htop but with zoom-able charts, CPU, GPU, network, and disk usage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not panic if no ~/.cache/ directory exists

Gui13 opened this issue · comments

I'm on nixos, and at fresh start, there is no .cache directory in my home.

Zenith panics because it doesn't check for existence of this directory:

thread '' panicked at 'Couldn't Create DB dir.: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/main.rs:115:17

Creating the directory before launching zenith fixes the issue:

mkdir ~/.cache
zenith  # works

You could either create the directory if it doesn't exist, or maybe automatically disable the history if the .cache directory doesn't exist?

This issue was fixed in c90861a in release 0.10.1, if you're using nix packages stable, you're probably on 0.10.0. Could you verify which version you're using with zenith --version?

Thanks!

@Gui13 could you try nix packages unstable (zenith v0.12.0) to see if that fixes your issue?