summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Oram <dev@mitmaro.ca>2023-07-21 01:27:20 -0230
committerTim Oram <dev@mitmaro.ca>2023-07-21 01:36:43 -0230
commit6af049a50d3aa3a0c0708e9f29dda802bc4c675e (patch)
treee92f9c9926f9f849e99a6f77f9d784b76c4cfdb1
parent24a56377eaa7d12d8f99f0d00a4af6c554f833ed (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.lock12
-rw-r--r--src/input/Cargo.toml4
2 files changed, 16 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 3757eab..8a39926 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -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"