From 00375a6fe31b77db0f030a94162441b55a4e217c Mon Sep 17 00:00:00 2001 From: ripytide Date: Sun, 20 Oct 2024 10:40:01 +0100 Subject: [PATCH] add test backtraces --- .github/workflows/{check.yml => test.yaml} | 3 ++- src/backends/arch.rs | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) rename .github/workflows/{check.yml => test.yaml} (75%) diff --git a/.github/workflows/check.yml b/.github/workflows/test.yaml similarity index 75% rename from .github/workflows/check.yml rename to .github/workflows/test.yaml index 9a4d7f3..937e87c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/test.yaml @@ -13,5 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Cargo Test - run: cargo test --verbose + run: RUST_BACKTRACE=full cargo test --verbose --color never diff --git a/src/backends/arch.rs b/src/backends/arch.rs index 329ae1a..e9cd8c6 100644 --- a/src/backends/arch.rs +++ b/src/backends/arch.rs @@ -27,6 +27,10 @@ impl Backend for Arch { mut packages: BTreeMap, config: &Config, ) -> Result> { + if !command_found(config.arch_package_manager.as_command()) { + return Ok(BTreeMap::new()); + } + let groups = run_command_for_stdout( [ config.arch_package_manager.as_command(),