Skip to content

Commit e13f25c

Browse files
make suggest setup help messages better
1 parent 1279b3b commit e13f25c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Diff for: src/bootstrap/bin/main.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,17 @@ fn main() {
1515

1616
// check_version warnings are not printed during setup
1717
let changelog_suggestion =
18-
if matches!(config.cmd, Subcommand::Setup {..}) { None } else { check_version(&config) };
18+
if matches!(config.cmd, Subcommand::Setup { .. }) { None } else { check_version(&config) };
1919

2020
// NOTE: Since `./configure` generates a `config.toml`, distro maintainers will see the
2121
// changelog warning, not the `x.py setup` message.
2222
let suggest_setup = !config.config.exists() && !matches!(config.cmd, Subcommand::Setup { .. });
2323
if suggest_setup {
2424
println!("warning: you have not made a `config.toml`");
25-
println!("help: consider running `x.py setup` or copying `config.toml.example`");
25+
println!(
26+
"help: consider running `./x.py setup` or copying `config.toml.example` by running \
27+
`cp config.toml.example config.toml`"
28+
);
2629
} else if let Some(suggestion) = &changelog_suggestion {
2730
println!("{}", suggestion);
2831
}
@@ -31,7 +34,10 @@ fn main() {
3134

3235
if suggest_setup {
3336
println!("warning: you have not made a `config.toml`");
34-
println!("help: consider running `x.py setup` or copying `config.toml.example`");
37+
println!(
38+
"help: consider running `./x.py setup` or copying `config.toml.example` by running \
39+
`cp config.toml.example config.toml`"
40+
);
3541
} else if let Some(suggestion) = &changelog_suggestion {
3642
println!("{}", suggestion);
3743
}

0 commit comments

Comments
 (0)