Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Use std::io::IsTerminal instead of atty

See: https://rustsec.org/advisories/RUSTSEC-2021-0145

+10 -26
+7
CHANGELOG.md
··· 1 1 # Changelog 2 2 3 + ## Unreleased 4 + 5 + ### Compiler 6 + 7 + - Fix [RUSTSEC-2021-0145](https://rustsec.org/advisories/RUSTSEC-2021-0145) by 8 + using Rust's `std::io::IsTerminal` instead of the `atty` library. 9 + 3 10 ## v1.1.0 - 2024-04-16 4 11 5 12 ### Formatter
+1 -22
Cargo.lock
··· 169 169 ] 170 170 171 171 [[package]] 172 - name = "atty" 173 - version = "0.2.14" 174 - source = "registry+https://github.com/rust-lang/crates.io-index" 175 - checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 176 - dependencies = [ 177 - "hermit-abi 0.1.19", 178 - "libc", 179 - "winapi", 180 - ] 181 - 182 - [[package]] 183 172 name = "autocfg" 184 173 version = "1.2.0" 185 174 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 833 822 version = "1.1.0" 834 823 dependencies = [ 835 824 "async-trait", 836 - "atty", 837 825 "base16", 838 826 "bytes", 839 827 "camino", ··· 1005 993 1006 994 [[package]] 1007 995 name = "hermit-abi" 1008 - version = "0.1.19" 1009 - source = "registry+https://github.com/rust-lang/crates.io-index" 1010 - checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 1011 - dependencies = [ 1012 - "libc", 1013 - ] 1014 - 1015 - [[package]] 1016 - name = "hermit-abi" 1017 996 version = "0.3.9" 1018 997 source = "registry+https://github.com/rust-lang/crates.io-index" 1019 998 checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" ··· 1495 1474 source = "registry+https://github.com/rust-lang/crates.io-index" 1496 1475 checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1497 1476 dependencies = [ 1498 - "hermit-abi 0.3.9", 1477 + "hermit-abi", 1499 1478 "libc", 1500 1479 ] 1501 1480
-2
compiler-cli/Cargo.toml
··· 14 14 clap = { version = "4.5.4", features = ["derive"] } 15 15 # Recursively traversing directories 16 16 ignore = "0.4.22" 17 - # Check for tty 18 - atty = "0.2.14" 19 17 # Allow user to type in sensitive information without showing it in the shell 20 18 rpassword = "5.0.1" 21 19 # Async runtime
+2 -2
compiler-cli/src/cli.rs
··· 4 4 }; 5 5 use hexpm::version::Version; 6 6 use std::{ 7 - io::Write, 7 + io::{IsTerminal, Write}, 8 8 time::{Duration, Instant}, 9 9 }; 10 10 use termcolor::{BufferWriter, Color, ColorChoice, ColorSpec, WriteColor}; ··· 195 195 fn color_choice() -> ColorChoice { 196 196 if colour_forced() { 197 197 termcolor::ColorChoice::Always 198 - } else if atty::is(atty::Stream::Stderr) { 198 + } else if std::io::stderr().is_terminal() { 199 199 termcolor::ColorChoice::Auto 200 200 } else { 201 201 termcolor::ColorChoice::Never