Use '-' to read Hurl file from standard input

This commit is contained in:
jcamiel 2024-03-14 12:49:36 +01:00
parent a5120e9a25
commit a749929a71
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC

View File

@ -201,7 +201,7 @@ pub fn input_files(arg_matches: &ArgMatches) -> Result<Vec<Input>, CliOptionsErr
let mut files = vec![];
if let Some(filenames) = get_strings(arg_matches, "input_files") {
for filename in &filenames {
let file = Input::File(PathBuf::from(filename));
let file = Input::new(filename);
if !file.exists() {
return Err(CliOptionsError::InvalidInputFile(PathBuf::from(filename)));
}