Skip to content

An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.

fix --assign

rustdesk71996c95090e
diff --git a/src/core_main.rs b/src/core_main.rs
index a6088d6b2..7e328d278 100644
--- a/src/core_main.rs
+++ b/src/core_main.rs
@@ -359,10 +359,15 @@ pub fn core_main() -> Option<Vec<String>> {
body["strategy_name"] = serde_json::json!(name);
}
let url = crate::ui_interface::get_api_server() + "/api/devices/cli";
- if let Err(err) = crate::post_request_sync(url, body.to_string(), &header) {
- println!("{}", err);
- } else {
- println!("Done!");
+ match crate::post_request_sync(url, body.to_string(), &header) {
+ Err(err) => println!("{}", err),
+ Ok(text) => {
+ if text.is_empty() {
+ println!("Done!");
+ } else {
+ println!("{}", text);
+ }
+ }
}
}
} else {