From 5a8adc342bcf01f535079d06778a9f244ba7e96f Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 19 Dec 2022 10:12:45 -0800 Subject: chore(test_util): use pty2 instead of pty (#17131) Fixes https://github.com/denoland/deno/issues/484 Removes dependency on winapi 0.2.x versions. --- test_util/Cargo.toml | 2 +- test_util/src/pty.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'test_util') diff --git a/test_util/Cargo.toml b/test_util/Cargo.toml index 45fa76881..a2b2626f8 100644 --- a/test_util/Cargo.toml +++ b/test_util/Cargo.toml @@ -40,7 +40,7 @@ tokio-tungstenite.workspace = true url.workspace = true [target.'cfg(unix)'.dependencies] -pty = "0.2.2" +pty2 = "0.1.0" [target.'cfg(windows)'.dependencies] winapi = { workspace = true, features = ["consoleapi", "synchapi", "handleapi", "namedpipeapi", "winbase", "winerror"] } diff --git a/test_util/src/pty.rs b/test_util/src/pty.rs index 83a27926b..4970e08f4 100644 --- a/test_util/src/pty.rs +++ b/test_util/src/pty.rs @@ -24,7 +24,7 @@ pub fn create_pty( cwd: impl AsRef, env_vars: Option>, ) -> Box { - let fork = pty::fork::Fork::from_ptmx().unwrap(); + let fork = pty2::fork::Fork::from_ptmx().unwrap(); if fork.is_parent().is_ok() { Box::new(unix::UnixPty { fork }) } else { @@ -48,7 +48,7 @@ mod unix { use super::Pty; pub struct UnixPty { - pub fork: pty::fork::Fork, + pub fork: pty2::fork::Fork, } impl Drop for UnixPty { -- cgit v1.2.3