2.1.4: fix blank exit-node rendering, relabel for clarity
"(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:
parent
b8121ae00f
commit
941742c5b6
3 changed files with 15 additions and 9 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -54,7 +54,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "breadcrumbs"
|
name = "breadcrumbs"
|
||||||
version = "2.1.3"
|
version = "2.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap",
|
"clap",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "breadcrumbs"
|
name = "breadcrumbs"
|
||||||
version = "2.1.3"
|
version = "2.1.4"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "Profile-aware Wi-Fi state machine with Tailscale handling and self-healing watch daemon"
|
description = "Profile-aware Wi-Fi state machine with Tailscale handling and self-healing watch daemon"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
|
||||||
20
src/main.rs
20
src/main.rs
|
|
@ -330,10 +330,10 @@ fn cmd_status(
|
||||||
(Some(h), req) => {
|
(Some(h), req) => {
|
||||||
let ok = h.is_ok();
|
let ok = h.is_ok();
|
||||||
println!(
|
println!(
|
||||||
" tailscale {} {} {C_DIM}(exit: {}{}){C_RESET}",
|
" tailscale {} {} {C_DIM}(exit node: {}{}){C_RESET}",
|
||||||
dot(ok || !req),
|
dot(ok || !req),
|
||||||
h.describe(),
|
h.describe(),
|
||||||
s.exit_node,
|
if s.exit_node.is_empty() { "none" } else { &s.exit_node },
|
||||||
if req { "" } else { ", optional" }
|
if req { "" } else { ", optional" }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -715,11 +715,13 @@ fn cmd_list(cfg: &Config, show_pw: bool) -> Result<i32, String> {
|
||||||
println!(" bootstrap {b}");
|
println!(" bootstrap {b}");
|
||||||
}
|
}
|
||||||
if p.tailscale {
|
if p.tailscale {
|
||||||
|
let exit_node = p
|
||||||
|
.exit_node
|
||||||
|
.clone()
|
||||||
|
.unwrap_or_else(|| cfg.settings.exit_node.clone());
|
||||||
println!(
|
println!(
|
||||||
" tailscale required (exit: {})",
|
" tailscale required (exit node: {})",
|
||||||
p.exit_node
|
if exit_node.is_empty() { "none".to_string() } else { exit_node }
|
||||||
.clone()
|
|
||||||
.unwrap_or_else(|| cfg.settings.exit_node.clone())
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
let mut order: Vec<String> = p.networks.clone();
|
let mut order: Vec<String> = p.networks.clone();
|
||||||
|
|
@ -804,7 +806,11 @@ fn cmd_doctor(
|
||||||
);
|
);
|
||||||
println!(" internet {}", if s.internet { "ok" } else { "DOWN" });
|
println!(" internet {}", if s.internet { "ok" } else { "DOWN" });
|
||||||
if let Some(h) = &s.tailscale {
|
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 {
|
if let Some(iface) = &s.iface {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue