Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
pims committed Dec 18, 2022
1 parent 11407b8 commit 7e24d12
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,8 @@ extern "C" {

#[cfg(target_os = "macos")]
pub unsafe fn get_executable_path() -> anyhow::Result<String> {
let path = env::current_exe()?;
match path.into_os_string().into_string() {
Ok(exe_path) => Ok(exe_path),
Err(_) => bail!("Failed to convert PathBuf to String"),
}
let path = env::current_exe().with_context(|| "failed to retrieve current executable path")?;
Ok(path.to_string_lossy().to_string())
}

#[cfg(target_os = "freebsd")]
Expand Down

0 comments on commit 7e24d12

Please sign in to comment.