Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
cli: use Rust std library to get path to current exe
Merged liw opened 1 year ago

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

Signed-off-by: Lars Wirzenius liw@liw.fi

1 file changed +1 -1 d46b0b6d 749e8239
modified 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