about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-02-18 15:57:30 +0900
committerGitHub <noreply@github.com>2021-02-18 15:57:30 +0900
commit9e60e7e37903e5539cb6eba07473950238f5b33e (patch)
treefe5bcd74b68314ee17280f9522eb239f9abe3ded
parentfe15494857088edbed83dbfa088debd6b4d7bf65 (diff)
parente13f25cd6635adf4788953cf9a42144e1fe64742 (diff)
downloadrust-9e60e7e37903e5539cb6eba07473950238f5b33e.tar.gz
rust-9e60e7e37903e5539cb6eba07473950238f5b33e.zip
Rollup merge of #82211 - henryboisdequin:make-setup-msgs-better, r=jyn514
make `suggest_setup` help messages better

When I first built the compiler and didn't create a `config.toml.example`, the following was emitted:

```
help: consider running `x.py setup` or copying `config.toml.example`
```

I ran `x.py setup` but got an error so in this PR I made the help messages a little clearer.
-rw-r--r--src/bootstrap/bin/main.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs
index a32a4a7fe56..e730a2557e0 100644
--- a/src/bootstrap/bin/main.rs
+++ b/src/bootstrap/bin/main.rs
@@ -22,7 +22,10 @@ fn main() {
     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);
     }