File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed
Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ pub mod key;
22
33use clap:: Parser ;
44use colored:: { ColoredString , Colorize } ;
5+ use copypasta:: ClipboardProvider ;
56use core:: fmt;
67use key:: generate_key;
78use std:: path:: PathBuf ;
@@ -193,16 +194,19 @@ impl Args {
193194}
194195
195196fn main ( ) {
196- let mut args = Args :: parse ( ) ;
197-
198- #[ cfg( windows) ]
199- match ansi_term:: enable_ansi_support ( ) {
200- Ok ( _) => { }
201- Err ( _) => {
202- println ! ( "[WARN] Colors will be disabled, is this what you wanted?" ) ;
203- args. disable_color = true ;
204- }
205- } ;
197+ if cfg ! ( windows) {
198+ let mut args = Args :: parse ( ) ;
206199
207- args. generate_key ( ) ;
200+
201+ match ansi_term:: enable_ansi_support ( ) {
202+ Ok ( _) => { }
203+ Err ( _) => {
204+ println ! ( "[WARN] Colors will be disabled, is this what you wanted?" ) ;
205+ args. disable_color = true ;
206+ }
207+ } ;
208+ args. generate_key ( ) ;
209+ } else {
210+ Args :: parse ( ) . generate_key ( ) ;
211+ }
208212}
You can’t perform that action at this time.
0 commit comments