summaryrefslogtreecommitdiffstats
path: root/crates/rebel
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
parent801f049969be0ca907b74e53597bec33cba97af4 (diff)
downloadrebel-7164660d63052bfa47a082711a64529b026b35f2.tar
rebel-7164660d63052bfa47a082711a64529b026b35f2.zip
Move rebel-parse dependency from rebel-resolve to rebel
Diffstat (limited to 'crates/rebel')
-rw-r--r--crates/rebel/Cargo.toml1
-rw-r--r--crates/rebel/src/main.rs7
2 files changed, 7 insertions, 1 deletions
diff --git a/crates/rebel/Cargo.toml b/crates/rebel/Cargo.toml
index e9a399e..9eba0fa 100644
--- a/crates/rebel/Cargo.toml
+++ b/crates/rebel/Cargo.toml
@@ -9,6 +9,7 @@ edition = "2021"
[dependencies]
rebel-common = { path = "../rebel-common" }
+rebel-parse = { path = "../rebel-parse" }
rebel-resolve = { path = "../rebel-resolve" }
rebel-runner = { path = "../rebel-runner" }
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);