diff options
| -rw-r--r-- | atuin/src/command/client/doctor.rs | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/atuin/src/command/client/doctor.rs b/atuin/src/command/client/doctor.rs index 6602c04f..d6d179c7 100644 --- a/atuin/src/command/client/doctor.rs +++ b/atuin/src/command/client/doctor.rs @@ -183,14 +183,39 @@ impl DoctorDump { } } +fn checks(info: &DoctorDump) { + println!(); // spacing + // + let zfs_error = "[Filesystem] ZFS is known to have some issues with SQLite. Atuin uses SQLite heavily. If you are having poor performance, there are some workarounds here: https://github.com/atuinsh/atuin/issues/952".bold().red(); + let bash_plugin_error = "[Shell] If you are using Bash, Atuin requires that either bash-preexec or ble.sh be installed. Read more here: https://docs.atuin.sh/guide/installation/#bash".bold().red(); + + // ZFS: https://github.com/atuinsh/atuin/issues/952 + if info.system.disks.iter().any(|d| d.filesystem == "zfs") { + println!("{zfs_error}"); + } + + // Shell + if info.shell.name == "bash" + && !info + .shell + .plugins + .iter() + .any(|p| p == "blesh" || p == "bash-preexec") + { + println!("{bash_plugin_error}"); + } +} + pub fn run(settings: &Settings) -> Result<()> { println!("{}", "Atuin Doctor".bold()); println!("Checking for diagnostics"); - println!("Please include the output below with any bug reports or issues\n"); - let dump = DoctorDump::new(settings); + checks(&dump); + let dump = serde_yaml::to_string(&dump)?; + + println!("\nPlease include the output below with any bug reports or issues\n"); println!("{dump}"); Ok(()) |
