Skip to content

Commit

Permalink
Don't double-print status messages in GHA
Browse files Browse the repository at this point in the history
Before:

```
Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
  Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
   Downloading crates ...
```

After:

```
Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
   Downloading crates ...
```
  • Loading branch information
jyn514 committed Jun 5, 2023
1 parent dcf3571 commit af4e6c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/bootstrap/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,6 @@ impl Build {
}

fn group(&self, msg: &str) -> Option<gha::Group> {
self.info(&msg);
match self.config.dry_run {
DryRun::SelfCheck => None,
DryRun::Disabled | DryRun::UserSelected => Some(gha::group(&msg)),
Expand Down
2 changes: 2 additions & 0 deletions src/tools/build_helper/src/ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub mod gha {
pub fn group(name: impl std::fmt::Display) -> Group {
if std::env::var_os("GITHUB_ACTIONS").is_some() {
eprintln!("::group::{name}");
} else {
eprintln!("{name}")
}
Group(())
}
Expand Down

0 comments on commit af4e6c1

Please sign in to comment.