Skip to content

Commit

Permalink
パスのチェックを強化
Browse files Browse the repository at this point in the history
  • Loading branch information
mousecrusher2 committed Apr 17, 2024
1 parent abfd946 commit 977922d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ async fn main() {
std::process::exit(1);
}

if !cli.server_path.exists() || !cli.server_path.is_file() {
eprintln!("Server path does not exist");
std::process::exit(1);
}

let mut child = Command::new(&cli.server_path)
.env("LD_LIBRARY_PATH", cli.server_path.parent().unwrap())
.args(cli.server_options)
Expand Down

0 comments on commit 977922d

Please sign in to comment.