Skip to content

Commit

Permalink
Merge pull request #7 from mbround18/hotfix/server_exit_check
Browse files Browse the repository at this point in the history
Check for server_exit
  • Loading branch information
mbround18 authored Feb 5, 2021
2 parents 538f726 + 768dd05 commit 82e8515
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use clap::{ArgMatches};
use crate::utils::{get_variable, server_installed, get_working_dir};
use std::fs::{File, remove_file};
use std::io::Write;
use log::{info, error};
use log::{info, error, debug};
use tinytemplate::TinyTemplate;
use serde::Serialize;

Expand Down Expand Up @@ -63,7 +63,12 @@ fn parse_arg(args: &ArgMatches, name: &str, default: &str) -> String {
pub fn invoke(args: &ArgMatches) {
let paths = &[get_working_dir(), "server_exit.drp".to_string()];
let server_exit = &paths.join("/");
remove_file(server_exit).unwrap();
match remove_file(server_exit) {
Ok(_) => info!("Deleted server exit file."),
Err(_) => {
debug!("Server exit file did no pre-exist. Good!")
}
};

let mut command = create_execution("bash");
let command_args: &str = &[
Expand Down

0 comments on commit 82e8515

Please sign in to comment.