From 30b4a7486a81efefd7d2ffcea7fa11a127aed111 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Fri, 15 Jan 2021 02:59:37 +0900 Subject: [PATCH] chore: use CARGO_BIN_EXE instead of inspecting env::current_exe() (#3427) --- tests-integration/tests/process_stdio.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/tests-integration/tests/process_stdio.rs b/tests-integration/tests/process_stdio.rs index 86f5477b4ef..c01172e2067 100644 --- a/tests-integration/tests/process_stdio.rs +++ b/tests-integration/tests/process_stdio.rs @@ -11,16 +11,7 @@ use std::io; use std::process::{ExitStatus, Stdio}; fn cat() -> Command { - let mut me = env::current_exe().unwrap(); - me.pop(); - - if me.ends_with("deps") { - me.pop(); - } - - me.push("test-cat"); - - let mut cmd = Command::new(me); + let mut cmd = Command::new(env!("CARGO_BIN_EXE_test-cat")); cmd.stdin(Stdio::piped()).stdout(Stdio::piped()); cmd }