From f6c13a20c3567d707d8823279e3b197d7f3e8e47 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 29 Oct 2022 02:24:55 -0600 Subject: [PATCH] eval: Use correct value parser for expression_file Fallout from Clap 4.0 migration. --- src/command/eval.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/command/eval.rs b/src/command/eval.rs index 07efb9e..32156cb 100644 --- a/src/command/eval.rs +++ b/src/command/eval.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use clap::{Arg, ArgMatches, Command as ClapCommand}; +use clap::{Arg, ArgMatches, Command as ClapCommand, value_parser}; use crate::error::ColmenaError; use crate::util; @@ -28,7 +28,8 @@ For example, to retrieve the configuration of one node, you may write something .index(1) .value_name("FILE") .help("The .nix file containing the expression") - .num_args(1)) + .num_args(1) + .value_parser(value_parser!(PathBuf))) .arg(Arg::new("expression") .short('E') .value_name("EXPRESSION")