From 297538a72ce834c7fee6f259f8e67d08736f6bfe Mon Sep 17 00:00:00 2001 From: clux Date: Tue, 19 Sep 2023 10:01:45 +0100 Subject: [PATCH] just make the param optional, jq also supports it Signed-off-by: clux --- yq.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/yq.rs b/yq.rs index da8e25d..e47964c 100644 --- a/yq.rs +++ b/yq.rs @@ -107,7 +107,10 @@ struct Args { impl Args { fn jq_args(&self) -> Vec { - let mut args = vec![self.jq_query.clone().unwrap_or_else(|| ".".into())]; + let mut args = vec![]; + if let Some(query) = &self.jq_query { + args.push(query.into()) + } if self.compact_output { args.push("-c".into()); }