From 6e4a923574eac2d5e58df1313953caedb3e6a2f2 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Mon, 16 Feb 2026 21:34:41 +0000 Subject: test: dont use git fetch during tests this prevents cli output errors on tests such as: finds_based_on_naddr_on_embeded_relay_and_added_as_origin_remote --- src/bin/ngit/sub_commands/list.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/bin/ngit/sub_commands/list.rs b/src/bin/ngit/sub_commands/list.rs index ff43bd9..d2e338d 100644 --- a/src/bin/ngit/sub_commands/list.rs +++ b/src/bin/ngit/sub_commands/list.rs @@ -114,7 +114,11 @@ pub async fn launch(status: String, json: bool, id: Option) -> Result<() .flatten(); if let Some((remote_name, _)) = &nostr_remote { - run_git_fetch(remote_name)?; + if std::env::var("NGITTEST").is_ok() { + fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; + } else { + run_git_fetch(remote_name)?; + } } else { fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; } @@ -364,7 +368,11 @@ async fn launch_interactive() -> Result<()> { .flatten(); if let Some((remote_name, _)) = &nostr_remote { - run_git_fetch(remote_name)?; + if std::env::var("NGITTEST").is_ok() { + fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; + } else { + run_git_fetch(remote_name)?; + } } else { fetching_with_report(git_repo_path, &client, &repo_coordinates).await?; } -- cgit v1.2.3