File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -658,7 +658,15 @@ fn get_setup() -> Setup {
658658 trace ! ( "Command line argument(s):" ) ;
659659
660660 for ( index, key) in args. iter ( ) . enumerate ( ) {
661- let opt = key. trim_start_matches ( '-' ) ;
661+ let opt = {
662+ let key = key. trim_start_matches ( '-' ) ;
663+
664+ if let Some ( ( s, _) ) = key. split_once ( '=' ) {
665+ s
666+ } else {
667+ key
668+ }
669+ } ;
662670
663671 if index > 0
664672 && key. starts_with ( '-' )
@@ -668,13 +676,13 @@ fn get_setup() -> Setup {
668676 {
669677 if matches ! ( opt, PASSWORD | PASSWORD_SHORT | USERNAME | USERNAME_SHORT ) {
670678 // Don't log creds.
671- trace ! ( "\t \t {} \" XXXXXXXX\" " , key ) ;
679+ trace ! ( "\t \t {} \" XXXXXXXX\" " , opt ) ;
672680 } else {
673681 let value = matches. opt_str ( opt) . unwrap_or_else ( || "" . to_string ( ) ) ;
674682 if value. is_empty ( ) {
675- trace ! ( "\t \t {}" , key ) ;
683+ trace ! ( "\t \t {}" , opt ) ;
676684 } else {
677- trace ! ( "\t \t {} \" {}\" " , key , value) ;
685+ trace ! ( "\t \t {} \" {}\" " , opt , value) ;
678686 }
679687 }
680688 }
You can’t perform that action at this time.
0 commit comments