From 7164660d63052bfa47a082711a64529b026b35f2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 20 Apr 2024 17:11:34 +0200 Subject: Move rebel-parse dependency from rebel-resolve to rebel --- crates/rebel/Cargo.toml | 1 + crates/rebel/src/main.rs | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'crates/rebel') 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); -- cgit v1.2.3