Skip to content

Commit 31a3261

Browse files
bors[bot]dependabot[bot]matthiasbeyerkhuey
authored
Merge #109
109: Update nix requirement from 0.26 to 0.27 r=matthiasbeyer a=dependabot[bot] Updates the requirements on [nix](https://github.com/nix-rust/nix) to permit the latest version. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Matthias Beyer <[email protected]> Co-authored-by: Kyle Huey <[email protected]>
2 parents 3c205a9 + b442a91 commit 31a3261

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
rust:
19-
- 1.63.0
19+
- 1.65.0
2020
- stable
2121
- beta
2222
steps:
@@ -40,7 +40,7 @@ jobs:
4040
strategy:
4141
matrix:
4242
rust:
43-
- 1.63.0
43+
- 1.65.0
4444
- stable
4545
- beta
4646
# - nightly
@@ -92,7 +92,7 @@ jobs:
9292
- uses: actions/checkout@v3
9393
- uses: dtolnay/rust-toolchain@master
9494
with:
95-
toolchain: 1.63.0
95+
toolchain: 1.65.0
9696
components: rustfmt
9797
- name: cargo-fmt
9898
run: cargo fmt -- --check

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rust-version = "1.60"
1414

1515
[dependencies]
1616
comma = "1.0"
17-
nix = "0.26"
17+
nix = { version = "0.27", features = ["fs", "process", "signal", "term"] }
1818
regex = "1"
1919
tempfile = "3"
2020
thiserror = "1.0.34"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![crates.io](https://img.shields.io/crates/v/rexpect.svg)](https://crates.io/crates/rexpect)
44
[![Released API docs](https://docs.rs/rexpect/badge.svg)](https://docs.rs/rexpect)
55
[![Master API docs](https://img.shields.io/badge/docs-master-2f343b.svg)](http://philippkeller.github.io/rexpect)
6-
[![MSRV](https://img.shields.io/badge/MSRV-1.63.0-blue)]
6+
[![MSRV](https://img.shields.io/badge/MSRV-1.65.0-blue)]
77

88
Spawn, control, and respond to expected patterns of child applications and
99
processes, enabling the automation of interactions and testing. Components

src/process.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use nix::sys::{stat, termios};
1010
use nix::unistd::{close, dup, dup2, fork, setsid, ForkResult, Pid};
1111
use std;
1212
use std::fs::File;
13+
use std::io;
1314
use std::os::unix::io::{AsRawFd, FromRawFd};
1415
use std::os::unix::process::CommandExt;
1516
use std::process::Command;
@@ -118,9 +119,10 @@ impl PtyProcess {
118119
}
119120

120121
// set echo off
121-
let mut flags = termios::tcgetattr(STDIN_FILENO)?;
122+
let stdin = io::stdin();
123+
let mut flags = termios::tcgetattr(&stdin)?;
122124
flags.local_flags &= !termios::LocalFlags::ECHO;
123-
termios::tcsetattr(STDIN_FILENO, termios::SetArg::TCSANOW, &flags)?;
125+
termios::tcsetattr(&stdin, termios::SetArg::TCSANOW, &flags)?;
124126

125127
command.exec();
126128
Err(Error::Nix(nix::Error::last()))

0 commit comments

Comments
 (0)