From 749e8239852aa4591277d946e585607dc4f464aa Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 20 May 2024 07:38:28 +0300 Subject: [PATCH] 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 --- radicle-cli/src/commands/debug.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicle-cli/src/commands/debug.rs b/radicle-cli/src/commands/debug.rs index 1147249b..1bdf3520 100644 --- a/radicle-cli/src/commands/debug.rs +++ b/radicle-cli/src/commands/debug.rs @@ -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