Skip to content

Commit

Permalink
Use more maintained package
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew W. Harn <andrew.harn@broadcom.com>
  • Loading branch information
awharn committed Apr 25, 2023
1 parent a6ef25a commit a6234ef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
17 changes: 7 additions & 10 deletions zowex/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion zowex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ simple-error = "0.2.3"
supports-color = "2.0.0"
sysinfo = "0.28.2"
whoami = "1.4.0"
yansi = "0.5.1"

[target.'cfg(windows)'.dependencies]
fslock = "0.2.1"
named_pipe = "0.4.1"
ansi_term = "0.12.1"
8 changes: 3 additions & 5 deletions zowex/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ use pathsearch::PathSearcher;
extern crate supports_color;
use supports_color::Stream;

#[cfg(target_family = "windows")]
extern crate ansi_term;
extern crate yansi;
use yansi::Paint;

extern crate whoami;
use whoami::username;
Expand Down Expand Up @@ -150,7 +150,6 @@ pub fn util_get_zowe_env() -> HashMap<String, String> {
}

// Make sure ansi is enabled for the response
#[cfg(target_family = "windows")]
if !util_enable_ansi() {
environment.insert(String::from("FORCE_COLOR"), String::from("0"));
}
Expand Down Expand Up @@ -188,7 +187,6 @@ pub fn util_terminal_supports_color() -> i32 {
return 0;
}

#[cfg(target_family = "windows")]
pub fn util_enable_ansi() -> bool {
ansi_term::enable_ansi_support().is_ok()
Paint::enable_windows_ascii()
}

0 comments on commit a6234ef

Please sign in to comment.