diff options
author | Tim Oram <dev@mitmaro.ca> | 2023-07-21 01:27:20 -0230 |
---|---|---|
committer | Tim Oram <dev@mitmaro.ca> | 2023-07-21 01:36:43 -0230 |
commit | 6af049a50d3aa3a0c0708e9f29dda802bc4c675e (patch) | |
tree | e92f9c9926f9f849e99a6f77f9d784b76c4cfdb1 | |
parent | 24a56377eaa7d12d8f99f0d00a4af6c554f833ed (diff) |
Enable tty support on macOS
Crossterm has added tty pipe support behind a feature flag. This enables
that feature flag on macOS to allow for pipes to work again. This
technically creates a small performance drop on macOS, but since this
application is generally not IO bounded, this should be okay.
-rw-r--r-- | Cargo.lock | 12 | ||||
-rw-r--r-- | src/input/Cargo.toml | 4 |
2 files changed, 16 insertions, 0 deletions
@@ -134,6 +134,7 @@ checksum = "a84cda67535339806297f1b331d6dd6320470d2a0fe65381e79ee9e156dd3d13" dependencies = [ "bitflags", "crossterm_winapi", + "filedescriptor", "libc", "mio", "parking_lot", @@ -199,6 +200,17 @@ dependencies = [ ] [[package]] +name = "filedescriptor" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7199d965852c3bac31f779ef99cbb4537f80e952e2d6aa0ffeb30cce00f4f46e" +dependencies = [ + "libc", + "thiserror", + "winapi", +] + +[[package]] name = "form_urlencoded" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src/input/Cargo.toml b/src/input/Cargo.toml index cb47857..b182d05 100644 --- a/src/input/Cargo.toml +++ b/src/input/Cargo.toml @@ -24,6 +24,10 @@ parking_lot = "0.12.1" girt-config = {version = "2.3.0", path = "../config"} girt-runtime = {version = "2.3.0", path = "../runtime"} +# Fix tty issues on MacOS +[target.'cfg(target_os = "macos")'.dependencies] +crossterm = { version = "0.26.1", features = ["use-dev-tty"] } + [dev-dependencies] rstest = "0.18.1" lazy_static = "1.4.0" |