File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " bitsrun"
3
3
description = " A headless login and logout CLI for 10.0.0.55 at BIT"
4
- version = " 0.4 .0"
4
+ version = " 0.5 .0"
5
5
edition = " 2021"
6
6
license = " MIT"
7
7
homepage = " https://github.com/spencerwooo/bitsrun-rs"
@@ -35,13 +35,14 @@ tabled = { version = "0.14", features = ["color"] }
35
35
humansize = " 2.1"
36
36
chrono-humanize = " 0.2"
37
37
chrono = " 0.4"
38
- log = " 0.4.26"
39
- pretty_env_logger = " 0.5.0"
38
+ log = " 0.4"
39
+ pretty_env_logger = " 0.5"
40
+ enable-ansi-support = " 0.2"
40
41
41
42
[profile .release ]
42
43
strip = " symbols"
43
44
44
45
[package .metadata .deb ]
45
- copyright = " 2024 Spencer Woo"
46
+ copyright = " 2025 Spencer Woo"
46
47
maintainer-scripts = " debian/"
47
48
systemd-units = { enable = true , start = false }
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ use anyhow::Result;
11
11
use clap:: Parser ;
12
12
use cli:: ClientArgs ;
13
13
use cli:: StatusArgs ;
14
+ use enable_ansi_support:: enable_ansi_support;
14
15
use owo_colors:: OwoColorize ;
15
16
use owo_colors:: Stream :: Stderr ;
16
17
use owo_colors:: Stream :: Stdout ;
@@ -37,6 +38,11 @@ async fn main() {
37
38
}
38
39
39
40
async fn cli ( ) -> Result < ( ) > {
41
+ // disable ansi colors on non-supported windows terminals
42
+ if enable_ansi_support ( ) . is_err ( ) {
43
+ owo_colors:: set_override ( false ) ;
44
+ }
45
+
40
46
let args = Arguments :: parse ( ) ;
41
47
42
48
// reusable http client
You can’t perform that action at this time.
0 commit comments