Skip to content

Commit fc998aa

Browse files
committed
build: upgrade portable-pty
1 parent 3eee58a commit fc998aa

File tree

3 files changed

+28
-6
lines changed

3 files changed

+28
-6
lines changed

Cargo.lock

Lines changed: 20 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-branchless-testing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ itertools = "0.10.5"
1414
lazy_static = "1.4.0"
1515
lib = { package = "git-branchless-lib", version = "0.7.0", path = "../git-branchless-lib" }
1616
once_cell = "1.17.1"
17-
portable-pty = "0.7.0"
17+
portable-pty = "0.8.1"
1818
regex = "1.7.1"
1919
tempfile = "3.4.0"
2020
tracing = "0.1.37"

git-branchless-testing/src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,9 +791,13 @@ pub mod pty {
791791
// Use the native pty implementation for the system
792792
let pty_system = native_pty_system();
793793
let pty_size = PtySize::default();
794-
let mut pty = pty_system
794+
let pty = pty_system
795795
.openpty(pty_size)
796796
.map_err(|e| eyre!("Could not open pty: {}", e))?;
797+
let mut pty_master = pty
798+
.master
799+
.take_writer()
800+
.map_err(|e| eyre!("Could not take PTY master writer: {e}"))?;
797801

798802
// Spawn a git instance in the pty.
799803
let mut cmd = CommandBuilder::new(&git.path_to_git);
@@ -877,8 +881,8 @@ Screen contents:
877881
}
878882

879883
PtyAction::Write(value) => {
880-
write!(pty.master, "{value}")?;
881-
pty.master.flush()?;
884+
write!(pty_master, "{value}")?;
885+
pty_master.flush()?;
882886
}
883887
}
884888
}

0 commit comments

Comments
 (0)