chore: use CARGO_BIN_EXE instead of inspecting env::current_exe() (#3427)

This commit is contained in:
Taiki Endo
2021-01-14 09:59:37 -08:00
committed by GitHub
parent 0595902ba4
commit 30b4a7486a
+1 -10
View File
@@ -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
}