summaryrefslogtreecommitdiffstats
path: root/crates/rebel/src/main.rs
diff options
context:
space:
mode:
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);