You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main.rs
+41-5Lines changed: 41 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ use std::{
17
17
rc::Rc,
18
18
sync::Arc,
19
19
};
20
-
20
+
use std::collections::HashMap;
21
21
use clap::Parser;
22
22
use home::home_dir;
23
23
use rustyline::error::ReadlineError;
@@ -99,10 +99,11 @@ fn main() {
99
99
if args.password.is_none(){
100
100
args.password = Some(LineReaderHidden::new().readline(&format!("password for '{}': ", args.username)));
101
101
}
102
-
if !args.diagnostics_disable{
102
+
if !args.diagnostics_disabled{
103
103
init_diagnostics()
104
104
}
105
-
if !args.tls_disabled && !args.address.starts_with("https:"){
105
+
let address_info = parse_addresses(&args);
106
+
if !args.tls_disabled && !address_info.only_https{
106
107
println!(
107
108
"\
108
109
TLS connections can only be enabled when connecting to HTTPS endpoints, for example using 'https://<ip>:port'. \
@@ -113,10 +114,11 @@ fn main() {
113
114
}
114
115
let runtime = BackgroundRuntime::new();
115
116
let tls_root_ca_path = args.tls_root_ca.as_ref().map(|value| Path::new(value));
117
+
let driver_options = DriverOptions::new().use_replication(!args.replication_disabled).is_tls_enabled(!args.tls_disabled).tls_root_ca(tls_root_ca_path).unwrap();
0 commit comments