Update src/helpers.rs

Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Félix Saparelli 2022-06-01 00:59:00 +12:00 committed by Félix Saparelli
parent ac74da4a27
commit f2905dd46e
No known key found for this signature in database
GPG key ID: B948C4BAE44FC474

View file

@ -192,7 +192,13 @@ pub fn get_install_path<P: AsRef<Path>>(install_path: Option<P>) -> Option<PathB
}
// Local executable dir if no cargo is found
if let Some(d) = dirs::executable_dir() {
let dir = dirs::executable_dir();
if let Some(d) = &dir {
debug!("Fallback to {}", d.display());
}
dir
debug!("Fallback to {}", d.display());
return Some(d);
}