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:
parent
d46b0b6d11
commit
749e823985
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue