diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-11-09 16:22:34 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-11-09 16:22:34 +0800 |
| commit | 162a62fb6f0de4d70ba65044af2c67094ee59488 (patch) | |
| tree | 8401bd881ce5962b315bf9293b3f2ce80d3a9905 | |
| parent | 7b45feb5087ccbf90b316a01af0defaca20e6dfe (diff) | |
fix: Windows support
| -rw-r--r-- | Cargo.lock | 24 | ||||
| -rw-r--r-- | src/bin/jvv.rs | 5 |
2 files changed, 24 insertions, 5 deletions
@@ -1894,7 +1894,7 @@ dependencies = [ "tokio", "uuid", "vcs_docs", - "winapi-util", + "winapi", ] [[package]] @@ -2001,6 +2001,22 @@ dependencies = [ ] [[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] name = "winapi-util" version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2010,6 +2026,12 @@ dependencies = [ ] [[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] name = "windows-core" version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src/bin/jvv.rs b/src/bin/jvv.rs index 6c3258a..9f80e0e 100644 --- a/src/bin/jvv.rs +++ b/src/bin/jvv.rs @@ -189,10 +189,7 @@ async fn main() { // Init colored #[cfg(windows)] - if let Err(err) = colored::control::set_virtual_terminal(true) { - eprintln!("{}", t!("jvv.fail.colored_control", err = err.to_string())); - return; - } + let _ = colored::control::set_virtual_terminal(true); let Ok(parser) = JustEnoughVcsVault::try_parse() else { println!("{}", md(t!("jvv.help"))); |
