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:
@@ -52,17 +52,8 @@ impl BatTester {
|
||||
impl Default for BatTester {
|
||||
fn default() -> Self {
|
||||
let temp_dir = create_sample_directory().expect("sample directory");
|
||||
|
||||
let root = env::current_exe()
|
||||
.expect("tests executable")
|
||||
.parent()
|
||||
.expect("tests executable directory")
|
||||
.parent()
|
||||
.expect("bat executable directory")
|
||||
.to_path_buf();
|
||||
|
||||
let exe_name = if cfg!(windows) { "bat.exe" } else { "bat" };
|
||||
let exe = root.join(exe_name);
|
||||
|
||||
let exe = assert_cmd::cargo::cargo_bin!("bat").to_path_buf();
|
||||
|
||||
BatTester { temp_dir, exe }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user