Skip to content

Commit 25db168

Browse files
committed
fix(cli): skip config file loading during unit tests
Signed-off-by: Sam Betts <1769706+Tehsmash@users.noreply.github.com>
1 parent fa1add2 commit 25db168

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

a2acli/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,11 @@ pub enum CliError {
355355
}
356356

357357
pub async fn run(mut cli: Cli) -> Result<(), CliError> {
358-
let (cfg, cfg_path) = config::load_config()?;
359-
config::apply_config(&mut cli, &cfg, &cfg_path)?;
358+
#[cfg(not(test))]
359+
{
360+
let (cfg, cfg_path) = config::load_config()?;
361+
config::apply_config(&mut cli, &cfg, &cfg_path)?;
362+
}
360363
let compact = cli.output.unwrap_or(OutputFormat::Pretty) == OutputFormat::Json;
361364

362365
match &cli.command {

0 commit comments

Comments
 (0)