From e13f25cd6635adf4788953cf9a42144e1fe64742 Mon Sep 17 00:00:00 2001 From: Henry Boisdequin <65845077+henryboisdequin@users.noreply.github.com> Date: Wed, 17 Feb 2021 12:26:02 +0530 Subject: [PATCH] make suggest setup help messages better --- src/bootstrap/bin/main.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs index 07e582d4d29..e730a2557e0 100644 --- a/src/bootstrap/bin/main.rs +++ b/src/bootstrap/bin/main.rs @@ -15,14 +15,17 @@ fn main() { // check_version warnings are not printed during setup let changelog_suggestion = - if matches!(config.cmd, Subcommand::Setup {..}) { None } else { check_version(&config) }; + if matches!(config.cmd, Subcommand::Setup { .. }) { None } else { check_version(&config) }; // NOTE: Since `./configure` generates a `config.toml`, distro maintainers will see the // changelog warning, not the `x.py setup` message. let suggest_setup = !config.config.exists() && !matches!(config.cmd, Subcommand::Setup { .. }); if suggest_setup { println!("warning: you have not made a `config.toml`"); - println!("help: consider running `x.py setup` or copying `config.toml.example`"); + println!( + "help: consider running `./x.py setup` or copying `config.toml.example` by running \ + `cp config.toml.example config.toml`" + ); } else if let Some(suggestion) = &changelog_suggestion { println!("{}", suggestion); } @@ -31,7 +34,10 @@ fn main() { if suggest_setup { println!("warning: you have not made a `config.toml`"); - println!("help: consider running `x.py setup` or copying `config.toml.example`"); + println!( + "help: consider running `./x.py setup` or copying `config.toml.example` by running \ + `cp config.toml.example config.toml`" + ); } else if let Some(suggestion) = &changelog_suggestion { println!("{}", suggestion); }