summaryrefslogtreecommitdiffstats
path: root/crates/rebel/src/main.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2024-04-20 17:11:34 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2024-04-20 17:12:02 +0200
commit7164660d63052bfa47a082711a64529b026b35f2 (patch)
treeaa1358f85c6afe9ce50676d8e1f439fc97517367 /crates/rebel/src/main.rs
parent801f049969be0ca907b74e53597bec33cba97af4 (diff)
downloadrebel-7164660d63052bfa47a082711a64529b026b35f2.tar
rebel-7164660d63052bfa47a082711a64529b026b35f2.zip
Move rebel-parse dependency from rebel-resolve to rebel
Diffstat (limited to 'crates/rebel/src/main.rs')
-rw-r--r--crates/rebel/src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/rebel/src/main.rs b/crates/rebel/src/main.rs
index fe0671b..214e6ef 100644
--- a/crates/rebel/src/main.rs
+++ b/crates/rebel/src/main.rs
@@ -7,6 +7,7 @@ use std::{collections::HashSet, fs::File, path::Path};
use clap::Parser;
use rebel_common::error::*;
+use rebel_parse as parse;
use rebel_resolve::{self as resolve, context, pin};
use rebel_runner::{self as runner, Runner};
@@ -48,7 +49,11 @@ fn main() {
let mut force_run = HashSet::new();
for task in opts.tasks {
- let (task_ref, flags) = match ctx.parse(&task) {
+ let Ok((parsed, flags)) = parse::task_ref_with_flags(&task) else {
+ eprintln!("Invalid task syntax");
+ std::process::exit(1);
+ };
+ let task_ref = match ctx.lookup(parsed.id, parsed.args.host, parsed.args.target) {
Ok(task_ref) => task_ref,
Err(err) => {
eprintln!("{}", err);