Updated the start command to not wait on the server process
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Gregory Ballantine 2022-09-19 17:30:57 -04:00
parent dc9b3a7262
commit 16f2f26236

View File

@ -1,4 +1,4 @@
use std::process::Command;
use std::process::{Command, Stdio};
pub fn start_command(server_name: &str) -> Result<(), Box<dyn std::error::Error>> {
println!("Starting server {}.", server_name);
@ -16,7 +16,11 @@ pub fn start_command(server_name: &str) -> Result<(), Box<dyn std::error::Error>
}
// run the start command
Command::new(script_file_path).output()?;
Command::new(script_file_path)
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()?;
// return okay signal
Ok(())