Skip to content

Commit

Permalink
chore: use CARGO_BIN_EXE instead of inspecting env::current_exe() (#3427
Browse files Browse the repository at this point in the history
)
  • Loading branch information
taiki-e committed Jan 14, 2021
1 parent 0595902 commit 30b4a74
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tests-integration/tests/process_stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 30b4a74

Please sign in to comment.