From b5c0a1f45525fb634bd4ec710511dbb3b410bc1a Mon Sep 17 00:00:00 2001 From: nichmor Date: Thu, 15 Feb 2024 15:32:26 +0200 Subject: [PATCH] fix: supress git clone output and long test names --- crates/rattler_installs_packages/src/artifacts/sdist.rs | 4 ++-- ...kages__artifacts__sdist__tests__sdist_without_name.snap} | 0 ...ages__artifacts__sdist__tests__zip_timestamps_1980.snap} | 0 crates/rattler_installs_packages/src/index/git_interop.rs | 6 ------ 4 files changed, 2 insertions(+), 8 deletions(-) rename crates/rattler_installs_packages/src/artifacts/snapshots/{rattler_installs_packages__artifacts__sdist__tests__build_rich_sdist_but_without_metadata_in_path_as_source_dependency.snap => rattler_installs_packages__artifacts__sdist__tests__sdist_without_name.snap} (100%) rename crates/rattler_installs_packages/src/artifacts/snapshots/{rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_before_1980_error.snap => rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_1980.snap} (100%) diff --git a/crates/rattler_installs_packages/src/artifacts/sdist.rs b/crates/rattler_installs_packages/src/artifacts/sdist.rs index bcf9e9fb..d7e7c38a 100644 --- a/crates/rattler_installs_packages/src/artifacts/sdist.rs +++ b/crates/rattler_installs_packages/src/artifacts/sdist.rs @@ -656,7 +656,7 @@ mod tests { } #[tokio::test(flavor = "multi_thread")] - pub async fn build_rich_sdist_but_without_metadata_in_path_as_source_dependency() { + pub async fn sdist_without_name() { let path = Path::new(env!("CARGO_MANIFEST_DIR")) .join("../../test-data/sdists/rich_without_metadata_in_path.tar.gz"); @@ -1295,7 +1295,7 @@ mod tests { } #[tokio::test(flavor = "multi_thread")] - pub async fn test_zip_timestamps_before_1980_error() { + pub async fn test_zip_timestamps_1980() { let url = Url::parse("https://files.pythonhosted.org/packages/c0/3f/d7af728f075fb08564c5949a9c95e44352e23dee646869fa104a3b2060a3/tomli-2.0.1.tar.gz").unwrap(); let package_db = get_package_db(); diff --git a/crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__build_rich_sdist_but_without_metadata_in_path_as_source_dependency.snap b/crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__sdist_without_name.snap similarity index 100% rename from crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__build_rich_sdist_but_without_metadata_in_path_as_source_dependency.snap rename to crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__sdist_without_name.snap diff --git a/crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_before_1980_error.snap b/crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_1980.snap similarity index 100% rename from crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_before_1980_error.snap rename to crates/rattler_installs_packages/src/artifacts/snapshots/rattler_installs_packages__artifacts__sdist__tests__zip_timestamps_1980.snap diff --git a/crates/rattler_installs_packages/src/index/git_interop.rs b/crates/rattler_installs_packages/src/index/git_interop.rs index 8139b66a..a3497fe0 100644 --- a/crates/rattler_installs_packages/src/index/git_interop.rs +++ b/crates/rattler_installs_packages/src/index/git_interop.rs @@ -2,7 +2,6 @@ use std::collections::HashMap; use std::fmt; use std::{ fmt::{Display, Formatter}, - io::IsTerminal, path::PathBuf, process::Command, str::FromStr, @@ -221,11 +220,6 @@ fn git_command(sub_cmd: &str) -> Command { let mut command = Command::new("git"); command.arg(sub_cmd); - if std::io::stdin().is_terminal() { - command.stdout(std::process::Stdio::inherit()); - command.stderr(std::process::Stdio::inherit()); - command.arg("--progress"); - } command }