mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-28 00:00:11 +02:00
chore: use CARGO_BIN_EXE instead of inspecting env::current_exe() (#3427)
This commit is contained in:
@@ -11,16 +11,7 @@ use std::io;
|
|||||||
use std::process::{ExitStatus, Stdio};
|
use std::process::{ExitStatus, Stdio};
|
||||||
|
|
||||||
fn cat() -> Command {
|
fn cat() -> Command {
|
||||||
let mut me = env::current_exe().unwrap();
|
let mut cmd = Command::new(env!("CARGO_BIN_EXE_test-cat"));
|
||||||
me.pop();
|
|
||||||
|
|
||||||
if me.ends_with("deps") {
|
|
||||||
me.pop();
|
|
||||||
}
|
|
||||||
|
|
||||||
me.push("test-cat");
|
|
||||||
|
|
||||||
let mut cmd = Command::new(me);
|
|
||||||
cmd.stdin(Stdio::piped()).stdout(Stdio::piped());
|
cmd.stdin(Stdio::piped()).stdout(Stdio::piped());
|
||||||
cmd
|
cmd
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user