fix(cli): use terminal_size instead of term_size for Windows support (#3955)

This commit is contained in:
Lucas Fernandes Nogueira
2022-04-24 09:54:22 -07:00
committed by GitHub
parent f66bc3c2b8
commit f68af45a11
3 changed files with 2 additions and 14 deletions

11
tooling/cli/Cargo.lock generated
View File

@@ -2733,7 +2733,6 @@ dependencies = [
"tauri-bundler",
"tauri-utils",
"tempfile",
"term_size",
"terminal_size",
"toml",
"toml_edit",
@@ -2804,16 +2803,6 @@ dependencies = [
"utf-8",
]
[[package]]
name = "term_size"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e4129646ca0ed8f45d09b929036bafad5377103edd06e50bf574b353d2b08d9"
dependencies = [
"libc",
"winapi 0.3.9",
]
[[package]]
name = "termcolor"
version = "1.1.3"

View File

@@ -64,7 +64,6 @@ url = { version = "2.2", features = [ "serde" ] }
os_pipe = "1"
ignore = "0.4"
ctrlc = "3.2"
term_size = "0.3"
[target."cfg(windows)".dependencies]
encode_unicode = "0.3"

View File

@@ -416,8 +416,8 @@ fn start_app(
command
.env(
"CARGO_TERM_PROGRESS_WIDTH",
term_size::dimensions_stderr()
.map(|(w, _)| w)
terminal_size::terminal_size()
.map(|(w, _)| w.0)
.unwrap_or(80)
.to_string(),
)