use console::style;
use std::{fs, path::Path};
pub fn canonicalized_fallback_respond_dir_to_print(fallback_respond_dir: &str) -> String {
let p = Path::new(fallback_respond_dir);
if !p.is_relative() {
return style(fallback_respond_dir).green().to_string();
}
let Ok(absolute_path) = fs::canonicalize(fallback_respond_dir) else {
return style(fallback_respond_dir).green().to_string();
};
match absolute_path.to_str() {
Some(abs) => format!("{} ({})", style(fallback_respond_dir).green(), abs),
None => style(fallback_respond_dir).green().to_string(),
}
}