From 409fdb0c00168ca8dfe14ae5a4afcfabdc1501b3 Mon Sep 17 00:00:00 2001 From: sundy-li <543950155@qq.com> Date: Fri, 25 Oct 2024 09:20:20 +0800 Subject: [PATCH] chore: use build.rs to build frontend resources --- cli/src/display.rs | 2 +- cli/src/web.rs | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/cli/src/display.rs b/cli/src/display.rs index e3ffd7b4..91cdea99 100644 --- a/cli/src/display.rs +++ b/cli/src/display.rs @@ -153,7 +153,7 @@ impl<'a> FormatDisplay<'a> { eprintln!("Failed to start server: {}", e); } }); - + println!(""); return Ok(()); } diff --git a/cli/src/web.rs b/cli/src/web.rs index d0ca10dc..224ed044 100644 --- a/cli/src/web.rs +++ b/cli/src/web.rs @@ -64,12 +64,7 @@ pub async fn start_server_and_open_browser<'a>(explain_result: String) -> Result let url = format!("http://0.0.0.0:{}", port); println!("Started a new server at: {url}"); - // Open the browser in a separate task - println!( - "env {} | {}", - env::var("SSH_CLIENT").is_ok(), - env::var("SSH_TTY").is_ok() - ); + // Open the browser in a separate task if not in ssh mode let in_sshmode = env::var("SSH_CLIENT").is_ok() || env::var("SSH_TTY").is_ok(); if !in_sshmode { tokio::spawn(async move {