1
0
mirror of https://github.com/sharkdp/bat.git synced 2026-02-08 00:32:08 +00:00

Replace deprecated cargo_bin with cargo_bin! macro

The old Command::cargo_bin() is deprecated and will break when Cargo
changes build directory layout. Updated to use cargo_bin!() macro instead.

Bumped assert_cmd to 2.0.16 to get the new macro.

Fixes #3528
This commit is contained in:
Your Name
2026-01-08 09:28:11 -05:00
parent 4e84e838a3
commit 6c75acfffc
4 changed files with 6 additions and 22 deletions

View File

@@ -4,7 +4,7 @@ use assert_cmd::cargo::CommandCargoExt;
use std::process::Command;
pub fn bat_raw_command_with_config() -> Command {
let mut cmd = Command::cargo_bin("bat").unwrap();
let mut cmd = Command::new(assert_cmd::cargo::cargo_bin!("bat"));
cmd.current_dir("tests/examples");
cmd.env_remove("BAT_CACHE_PATH");
cmd.env_remove("BAT_CONFIG_DIR");