about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHenry Boisdequin <65845077+henryboisdequin@users.noreply.github.com>2021-02-17 12:26:02 +0530
committerHenry Boisdequin <65845077+henryboisdequin@users.noreply.github.com>2021-02-17 12:26:02 +0530
commite13f25cd6635adf4788953cf9a42144e1fe64742 (patch)
tree0a4400df3f963bb04ff56e26dc3bdbb6208e9e36
parent1279b3b9232e4c44112d98f19cfa8846776d1fe8 (diff)
downloadrust-e13f25cd6635adf4788953cf9a42144e1fe64742.tar.gz
rust-e13f25cd6635adf4788953cf9a42144e1fe64742.zip
make suggest setup help messages better
-rw-r--r--src/bootstrap/bin/main.rs12
1 files 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);
     }