Merge branch 'refactor/remove-irttd-alias'
Rust CI / cargo fmt (push) Successful in 19s
Rust CI / cargo check (x86_64-unknown-linux-gnu) (push) Successful in 41s
Rust CI / cargo clippy (push) Successful in 42s
Rust CI / cargo test (x86_64-unknown-linux-gnu) (push) Successful in 1m28s
Rust CI / cargo check (x86_64-unknown-linux-musl) (push) Successful in 41s
Rust CI / cargo doc (push) Successful in 21s
Rust CI / cargo test (x86_64-unknown-linux-musl) (push) Successful in 1m31s
Proto Fuzz Smoke / cargo fuzz smoke (push) Successful in 1m31s
Netem Interop / netem interop (push) Successful in 1m14s
Supply chain / cargo-deny advisories (push) Successful in 6s
Supply chain / cargo-deny bans licenses sources (push) Successful in 9s
Supply chain / actionlint (push) Successful in 3s

This commit is contained in:
Nils Andreas Svee committed 2026-09-15 12:50:25 +07:00
commit 865c166828
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -22,7 +22,7 @@ pub fn detect_applet_from_argv0(argv0: &str) -> Option<RequestedApplet> {
match applet_basename(argv0) { match applet_basename(argv0) {
"irtt-client" => Some(RequestedApplet::Client), "irtt-client" => Some(RequestedApplet::Client),
"irtt-tui" => Some(RequestedApplet::Tui), "irtt-tui" => Some(RequestedApplet::Tui),
"irttd" | "irtt-server" => Some(RequestedApplet::Server), "irtt-server" => Some(RequestedApplet::Server),
"irtt-rs" => None, "irtt-rs" => None,
_ => None, _ => None,
} }
@@ -199,6 +199,7 @@ mod tests {
detect_applet_from_argv0("irtt-server"), detect_applet_from_argv0("irtt-server"),
Some(RequestedApplet::Server) Some(RequestedApplet::Server)
); );
assert_eq!(detect_applet_from_argv0("irttd"), None);
assert_eq!(detect_applet_from_argv0("irtt-rs"), None); assert_eq!(detect_applet_from_argv0("irtt-rs"), None);
assert_eq!(detect_applet_from_argv0("custom-name"), None); assert_eq!(detect_applet_from_argv0("custom-name"), None);
} }
+1 -1
View File
@@ -31,7 +31,7 @@ The build also produces dedicated binaries: `irtt-client`, `irtt-tui`, and
what it is invoked or copied as — it does not consult argv0 dispatch logic. what it is invoked or copied as — it does not consult argv0 dispatch logic.
`irtt-rs` itself inspects argv0 first: if invoked (or symlinked/copied) under `irtt-rs` itself inspects argv0 first: if invoked (or symlinked/copied) under
one of the recognized applet names — `irtt-client`, `irtt-tui`, `irttd`, or one of the recognized applet names — `irtt-client`, `irtt-tui`, or
`irtt-server` — it runs that applet directly, without needing a subcommand. `irtt-server` — it runs that applet directly, without needing a subcommand.
Any other name starting with `irtt-` (other than `irtt-rs` itself) is Any other name starting with `irtt-` (other than `irtt-rs` itself) is
rejected as an unknown applet name before subcommand parsing is even rejected as an unknown applet name before subcommand parsing is even