Skip to content

Commit

Permalink
updog: print space between variant and version rather than hyphen
Browse files Browse the repository at this point in the history
Variant names can include versions (e.g. aws-k8s-1.15) and seeing that combined
with the update version using a hyphen can be confusing.  For example, in
aws-k8s-1.15-0.3.0, it's unclear what each version applies to.  This change
uses a space instead, to visually separate the two components.
  • Loading branch information
tjkirch committed Feb 27, 2020
1 parent 60ebe8c commit 5666387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/updater/updog/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ fn parse_args(args: std::env::Args) -> Arguments {
}

fn fmt_full_version(update: &Update) -> String {
format!("{}-{}", update.variant, update.version)
format!("{} {}", update.variant, update.version)
}

fn output<T: Serialize>(json: bool, object: T, string: &str) -> Result<()> {
Expand Down Expand Up @@ -532,7 +532,7 @@ fn main_inner() -> Result<()> {
output(
arguments.json,
&u,
&format!("Update applied: {}-{}", u.variant, u.version),
&format!("Update applied: {}", fmt_full_version(&u)),
)?;
} else if let Some(wave) = u.jitter(config.seed) {
// return the jittered time of our wave in the update
Expand Down

0 comments on commit 5666387

Please sign in to comment.