cli: use Rust stdlib to get path to current exe

This is more portable than reading /proc/self/exe, which only works on
Linux.

Signed-off-by: Lars Wirzenius <liw@liw.fi>
This commit is contained in:
Lars Wirzenius 2024-05-20 07:38:28 +03:00 committed by cloudhead
parent d46b0b6d11
commit 749e823985
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ fn debug(profile: &Profile) -> anyhow::Result<()> {
}));
let debug = DebugInfo {
rad_exe: if let Ok(filename) = std::fs::read_link("/proc/self/exe") {
rad_exe: if let Ok(filename) = std::env::current_exe() {
Some(filename)
} else {
None