aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-03 18:35:08 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-03 18:35:08 -0600
commit69ef7154ddcb4c57a882044e6351395fe56ef075 (patch)
treecb9f052ef5c5e92543efada34ebe802ee98ed71d
parente84322e5c45c5bc44a228e7912b5d50d7e91b841 (diff)
downloadmakers-69ef7154ddcb4c57a882044e6351395fe56ef075.tar.gz
makers-69ef7154ddcb4c57a882044e6351395fe56ef075.zip
don't try to build anything if we're printing everything
-rw-r--r--src/main.rs25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/main.rs b/src/main.rs
index 64dcd2a..ceeb0cf 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -71,21 +71,20 @@ fn main() -> Result<()> {
if args.print_everything {
println!("{}", &makefile);
- }
-
- let targets = if args.targets().count() == 0 {
- let first_target = makefile.first_non_special_target.clone();
- match first_target {
- Some(x) => vec![x],
- None => bail!("no targets given on command line or found in makefile."),
- }
} else {
- args.targets().cloned().collect()
- };
+ let targets = if args.targets().count() == 0 {
+ let first_target = makefile.first_non_special_target.clone();
+ match first_target {
+ Some(x) => vec![x],
+ None => bail!("no targets given on command line or found in makefile."),
+ }
+ } else {
+ args.targets().cloned().collect()
+ };
- for target in targets {
- makefile.update_target(&target)?;
+ for target in targets {
+ makefile.update_target(&target)?;
+ }
}
-
Ok(())
}