fix: cli compilation error when using cli feature

This commit is contained in:
Kingtous
2022-06-07 11:25:34 +08:00
parent c0aa0d743a
commit e468ae5797
6 changed files with 36 additions and 28 deletions

View File

@@ -186,7 +186,7 @@ fn main() {
.about("RustDesk command line tool")
.args_from_usage(&args)
.get_matches();
use hbb_common::env_logger::*;
use hbb_common::{env_logger::*, config::LocalConfig};
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info"));
if let Some(p) = matches.value_of("port-forward") {
let options: Vec<String> = p.split(":").map(|x| x.to_owned()).collect();
@@ -213,6 +213,7 @@ fn main() {
remote_host = options[3].clone();
}
let key = matches.value_of("key").unwrap_or("").to_owned();
cli::start_one_port_forward(options[0].clone(), port, remote_host, remote_port, key);
let token = LocalConfig::get_option("access_token");
cli::start_one_port_forward(options[0].clone(), port, remote_host, remote_port, key, token);
}
}