Skip to content

Commit

Permalink
Rollup merge of #106059 - jyn514:setup-twice, r=Nilstrieb
Browse files Browse the repository at this point in the history
Avoid running the `Profile` step twice on `x setup`

Prevents runs like the following:
```
$ x setup
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
b) compiler: Contribute to the compiler itself
c) codegen: Contribute to the compiler, and also modify LLVM or codegen
d) tools: Contribute to tools which depend on the compiler, but do not modify it directly (e.g. rustdoc, clippy, miri)
e) user: Install Rust from source
Please choose one (a/b/c/d/e): b

To get started, try one of the following commands:
- `x.py check`
- `x.py build`
- `x.py test`
For more suggestions, see https://rustc-dev-guide.rust-lang.org/building/suggested.html
`x.py` will now use the configuration at /home/nilsh/projects/rustfast/src/bootstrap/defaults/config.compiler.toml
Welcome to the Rust project! What do you want to do with x.py?
...
```

r? `@Nilstrieb`
  • Loading branch information
matthiaskrgr authored Dec 23, 2022
2 parents bbde213 + 103816d commit fa1e34f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bootstrap/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ impl Step for Profile {
}

fn make_run(run: RunConfig<'_>) {
if run.builder.config.dry_run() {
return;
}

// for Profile, `run.paths` will have 1 and only 1 element
// this is because we only accept at most 1 path from user input.
// If user calls `x.py setup` without arguments, the interactive TUI
Expand Down

0 comments on commit fa1e34f

Please sign in to comment.