From 40a387c4bd9f4d0e3e6875001d69d456f554a9ca Mon Sep 17 00:00:00 2001
From: Cassaundra Smith <cass@cassaundra.org>
Date: Fri, 7 Oct 2022 17:03:29 -0700
Subject: [PATCH] Use correct version of cargo in test

---
 tests/testsuite/cargo_remove/offline/mod.rs | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/tests/testsuite/cargo_remove/offline/mod.rs b/tests/testsuite/cargo_remove/offline/mod.rs
index ab86ed55545..d0346392731 100644
--- a/tests/testsuite/cargo_remove/offline/mod.rs
+++ b/tests/testsuite/cargo_remove/offline/mod.rs
@@ -2,7 +2,6 @@ use cargo_test_support::compare::assert_ui;
 use cargo_test_support::curr_dir;
 use cargo_test_support::CargoCommand;
 use cargo_test_support::Project;
-use cargo_test_support::TestEnv;
 
 use crate::cargo_remove::init_registry;
 
@@ -14,9 +13,7 @@ fn case() {
     let cwd = &project_root;
 
     // run the metadata command to populate the cache
-    let cargo = std::env::var_os("CARGO").unwrap();
-    snapbox::cmd::Command::new(cargo)
-        .test_env()
+    snapbox::cmd::Command::cargo_ui()
         .arg("metadata")
         .current_dir(cwd)
         .assert()