diff --git a/src/common/fs.rs b/src/common/fs.rs index cf8a737..bb8e994 100644 --- a/src/common/fs.rs +++ b/src/common/fs.rs @@ -4,6 +4,7 @@ use std::ffi::OsStr; use std::fs::{self, create_dir_all, File}; use std::io; use thiserror::Error; +use std::env::current_exe; pub trait ToStringExt { fn to_string(&self) -> String; @@ -77,7 +78,7 @@ fn follow_symlink(pathbuf: PathBuf) -> Result { } fn exe_pathbuf() -> Result { - let pathbuf = std::env::current_exe().context("Unable to acquire executable's path")?; + let pathbuf = current_exe().context("Unable to acquire executable's path")?; #[cfg(target_family = "windows")] let pathbuf = dunce::canonicalize(pathbuf)?;