Skip to content

Commit

Permalink
feat(cli): Pass through output of special debug target
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Dec 17, 2020
1 parent 97a3a49 commit 0f6471f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/make/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub fn run(target: Vec<String>) -> Result<()> {
.args(&makeflags)
.args(&makefiles)
.args(&target);
let targets: Vec<_> = target.into_iter().collect();
// Start deprecating non-CLI usage
let gitname = status::get_gitname()?;
let sources = status::get_sources()?;
Expand Down Expand Up @@ -64,7 +65,7 @@ pub fn run(target: Vec<String>) -> Result<()> {
if CONF.get_bool("quiet")? {
process = process.env("QUIET", "true");
};
if CONF.get_bool("verbose")? {
if CONF.get_bool("verbose")? || targets.contains(&"debug".into()) {
process = process.env("VERBOSE", "true");
};
let repo = get_repo()?;
Expand All @@ -83,7 +84,7 @@ pub fn run(target: Vec<String>) -> Result<()> {
"FONTSHIP" => match fields[1] {
"PRE" => report_start(fields[2]),
"STDOUT" => {
if fields[2] == "_gha" {
if targets.contains(&"_gha".into()) {
println!("{}", fields[3]);
} else if CONF.get_bool("verbose")? {
report_line(fields[3]);
Expand Down Expand Up @@ -120,7 +121,12 @@ pub fn run(target: Vec<String>) -> Result<()> {
Ok(ExitStatus::Exited(int)) => {
let foo = int + ret;
match foo {
0 => Ok(()),
0 => {
if targets.contains(&"debug".into()) {
dump_backlog(&backlog)
};
Ok(())
}
1 => {
dump_backlog(&backlog);
Err(Box::new(io::Error::new(
Expand Down

0 comments on commit 0f6471f

Please sign in to comment.