try ansi_color package for Windows builds

This commit is contained in:
damirka 2021-04-13 19:16:04 +03:00
parent c336f5a704
commit fc3c45e056
3 changed files with 8 additions and 0 deletions

1
Cargo.lock generated
View File

@ -1347,6 +1347,7 @@ dependencies = [
name = "leo-lang"
version = "1.3.0"
dependencies = [
"ansi_term 0.12.1",
"anyhow",
"clap",
"colored",

View File

@ -150,6 +150,10 @@ features = [ "fmt" ]
[dependencies.zip]
version = "0.5"
# add ansi support for Windows builds
[target.'cfg(windows)'.dependencies.ansi_term]
version = "0.12.1"
[dev-dependencies.rusty-hook]
version = "0.11.2"

View File

@ -178,6 +178,9 @@ enum CommandOpts {
}
fn main() {
#[cfg(target_family = "windows")]
ansi_term::enable_ansi_support();
// Read command line arguments.
let opt = Opt::from_args();