Move empty result warning.

This commit is contained in:
jcamiel 2024-03-18 14:58:15 +01:00
parent 9444d6a058
commit bbdd0f9569
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
3 changed files with 5 additions and 5 deletions

View File

@ -76,7 +76,7 @@ fn main() {
let current_dir = current_dir.as_path();
let start = Instant::now();
let runs = run::run_seq(&opts.input_files, current_dir, &opts, &base_logger);
let runs = run::run_seq(&opts.input_files, current_dir, &opts);
let runs = match runs {
Ok(r) => r,
Err(CliError::IO(msg)) => exit_with_error(&msg, EXIT_ERROR_PARSING, &base_logger),

View File

@ -19,7 +19,6 @@ use crate::cli::options::CliOptions;
use crate::cli::CliError;
use crate::{cli, HurlRun};
use hurl::runner::{HurlResult, Input};
use hurl::util::logger::BaseLogger;
use hurl::{output, runner};
use std::path::Path;
@ -30,7 +29,6 @@ pub fn run_seq(
files: &[Input],
current_dir: &Path,
options: &CliOptions,
logger: &BaseLogger,
) -> Result<Vec<HurlRun>, CliError> {
let mut runs = vec![];
@ -63,8 +61,6 @@ pub fn run_seq(
if let Err(e) = result {
return Err(CliError::Runtime(e.to_string()));
}
} else {
logger.warning(&format!("No entry have been executed for file {filename}"));
}
}
if matches!(options.output_type, cli::OutputType::Json) {

View File

@ -131,6 +131,10 @@ pub fn run(
&mut logger,
);
if result.success && result.entries.last().is_none() {
logger.warning(&format!("No entry have been executed for file {filename}"));
}
progress.on_completed(&result, &mut logger.stderr);
Ok(result)