2.1.4: fix blank exit-node rendering, relabel for clarity
Some checks failed
Mirror to GitHub / mirror (push) Successful in 4s
Build and publish package / package (push) Successful in 1m19s
release / build (push) Failing after 52s

"(exit: , optional)" printed with nothing after the colon whenever no
Tailscale exit node was configured (the default). Now renders "none",
and relabels "exit:" to "exit node:" -- the abbreviated form read as an
exit *code* at a glance, which is what led to this being misdiagnosed
as a process-exit-code formatting bug in the first place.
This commit is contained in:
Breadway 2026-07-05 09:14:46 +08:00
parent b8121ae00f
commit 941742c5b6
3 changed files with 15 additions and 9 deletions

2
Cargo.lock generated
View file

@ -54,7 +54,7 @@ dependencies = [
[[package]]
name = "breadcrumbs"
version = "2.1.3"
version = "2.1.4"
dependencies = [
"clap",
"serde",

View file

@ -1,6 +1,6 @@
[package]
name = "breadcrumbs"
version = "2.1.3"
version = "2.1.4"
edition = "2021"
description = "Profile-aware Wi-Fi state machine with Tailscale handling and self-healing watch daemon"
license = "MIT"

View file

@ -330,10 +330,10 @@ fn cmd_status(
(Some(h), req) => {
let ok = h.is_ok();
println!(
" tailscale {} {} {C_DIM}(exit: {}{}){C_RESET}",
" tailscale {} {} {C_DIM}(exit node: {}{}){C_RESET}",
dot(ok || !req),
h.describe(),
s.exit_node,
if s.exit_node.is_empty() { "none" } else { &s.exit_node },
if req { "" } else { ", optional" }
);
}
@ -715,11 +715,13 @@ fn cmd_list(cfg: &Config, show_pw: bool) -> Result<i32, String> {
println!(" bootstrap {b}");
}
if p.tailscale {
let exit_node = p
.exit_node
.clone()
.unwrap_or_else(|| cfg.settings.exit_node.clone());
println!(
" tailscale required (exit: {})",
p.exit_node
.clone()
.unwrap_or_else(|| cfg.settings.exit_node.clone())
" tailscale required (exit node: {})",
if exit_node.is_empty() { "none".to_string() } else { exit_node }
);
}
let mut order: Vec<String> = p.networks.clone();
@ -804,7 +806,11 @@ fn cmd_doctor(
);
println!(" internet {}", if s.internet { "ok" } else { "DOWN" });
if let Some(h) = &s.tailscale {
println!(" tailscale {} (exit {})", h.describe(), s.exit_node);
println!(
" tailscale {} (exit node: {})",
h.describe(),
if s.exit_node.is_empty() { "none" } else { &s.exit_node }
);
}
if let Some(iface) = &s.iface {