Skip to content

Commit

Permalink
eval/nixpkgs: add note about why the extra curly braces are necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-h committed Sep 15, 2023
1 parent e043e3d commit de415d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ofborg/src/tasks/eval/nixpkgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use crate::tasks::evaluate::{get_prefix, make_gist, update_labels};

use std::path::Path;

use brace_expand::brace_expand;
use chrono::Utc;
use hubcaps::checks::{CheckRunOptions, CheckRunState, Conclusion, Output};
use hubcaps::gists::Gists;
Expand Down Expand Up @@ -626,7 +625,10 @@ fn parse_commit_messages(messages: &[String]) -> Vec<String> {
// Convert "foo: some notes" in to "foo"
line.split_once(':').map(|(pre, _)| pre.trim())
})
.flat_map(|line| brace_expand(&format!("{{{}}}", line)))
// NOTE: This transforms `{foo,bar}` into `{{foo,bar}}` and `foo,bar` into `{foo,bar}`,
// which allows both the old style (`foo,bar`) and the new style (`{foo,bar}`) to expand to
// `foo` and `bar`.
.flat_map(|line| brace_expand::brace_expand(&format!("{{{}}}", line)))
.map(|line| line.trim().to_owned())
.collect()
}
Expand Down

0 comments on commit de415d3

Please sign in to comment.