Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
remote-helper: Do not hard-code binary name
Lorenz Leutgeb committed 7 months ago
commit 101c4c8863f8e967d21dfe5dc87c5dbc96896c3e
parent e2bb1481b9ede5f8116a40a4d22cddddb45abc7a
1 file changed +3 -3
modified crates/radicle-remote-helper/src/main.rs
@@ -24,7 +24,7 @@ use radicle_cli::git::Rev;
use radicle_cli::terminal as cli;

pub const VERSION: Version = Version {
-
    name: "git-remote-rad",
+
    name: env!("CARGO_BIN_NAME"),
    commit: env!("GIT_HEAD"),
    version: env!("RADICLE_VERSION"),
    timestamp: env!("SOURCE_DATE_EPOCH"),
@@ -196,7 +196,7 @@ pub fn run(profile: radicle::Profile) -> Result<(), Error> {

    if let Err(e) = radicle::io::set_file_limit(4096) {
        if debug {
-
            eprintln!("git-remote-rad: unable to set open file limit: {e}");
+
            eprintln!("{}: unable to set open file limit: {e}", VERSION.name);
        }
    }

@@ -204,7 +204,7 @@ pub fn run(profile: radicle::Profile) -> Result<(), Error> {
        let tokens = read_line(&stdin, &mut line)?;

        if debug {
-
            eprintln!("git-remote-rad: {:?}", &tokens);
+
            eprintln!("{}: {}", VERSION.name, &tokens.join(" "));
        }

        match tokens.as_slice() {