Skip to content

Commit

Permalink
fix: print error of query (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf authored Jan 19, 2024
1 parent d8e319d commit d539c29
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = cli::Cli::new_and_parse();

let file_index = get_tags_from_files(args.path.as_str())?;
let query = QueryParser::parse(Rule::tagsearch, args.query.as_str())?;
let query = QueryParser::parse(Rule::tagsearch, args.query.as_str());

if let Err(e) = query {
println!("Error: {}", e);
std::process::exit(1);
}

let query = query.unwrap();

for file in file_index.iter() {
let ast = construct_query_ast(
Expand Down

0 comments on commit d539c29

Please sign in to comment.