Skip to main content

aoc_toolkit/cli/output/
browser.rs

1use std::path::Path;
2
3use crate::adapters::browser::RegistrationStatus;
4
5pub(crate) fn print_install_report(path: &Path) {
6    println!("✓ Native messaging host registered.");
7    println!("Manifest: {}", path.display());
8}
9
10pub(crate) fn print_registration_status(status: &RegistrationStatus) {
11    match status {
12        RegistrationStatus::Missing => {
13            println!("Native messaging host is not registered.");
14        }
15
16        RegistrationStatus::Registered => {
17            println!("✓ Native messaging host is registered.");
18        }
19
20        RegistrationStatus::Stale => {
21            println!("✗ Native messaging registration is stale.");
22        }
23    }
24}
25
26pub(crate) fn print_uninstall_report(removed: bool) {
27    if removed {
28        println!("✓ Native messaging host unregistered.");
29    } else {
30        println!("Native messaging host is not registered.");
31    }
32}