Fixed popup window
This commit is contained in:
@@ -48,7 +48,12 @@ pub async fn run_nmap(app: AppHandle, config: NmapConfig) -> Result<(), String>
|
||||
}
|
||||
cmd.stdout(Stdio::piped());
|
||||
cmd.stderr(Stdio::piped());
|
||||
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use std::os::windows::process::CommandExt;
|
||||
const CREATE_NO_WINDOW: u32 = 0x08000000;
|
||||
cmd.creation_flags(CREATE_NO_WINDOW);
|
||||
}
|
||||
let mut child = cmd
|
||||
.spawn()
|
||||
.map_err(|e| format!("Failed to start nmap: {}", e))?;
|
||||
|
||||
Reference in New Issue
Block a user