From fe0449a7c987b83d0788de569fd8e8acda2042fe Mon Sep 17 00:00:00 2001 From: core Date: Sat, 13 May 2023 17:42:08 -0400 Subject: [PATCH] fix! swap out game server too --- spacetime_rs/src/commands/docker.rs | 2 +- spacetime_rs/src/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spacetime_rs/src/commands/docker.rs b/spacetime_rs/src/commands/docker.rs index 155fa095640a8b7d20869adccfd8739ec64d01e3..92a8b4bde2a6bd93ddc113bf976821c296bea9fa 100644 --- a/spacetime_rs/src/commands/docker.rs +++ b/spacetime_rs/src/commands/docker.rs @@ -32,7 +32,7 @@ fn _build(img: &str, channel: &str, root: &PathBuf) -> Result<(), Box let index_html_src = fs::read_to_string(&index_html_path)?; let index_html_patched = find_and_replace(&index_html_src, &[ format!("s/let api_server = \"http:\\/\\/localhost:8080\";/let api_server = \"https:\\/\\/api.{}.{}\";/", a, b), - format!("s/let servers = [\"localhost:3000\"];/let servers = [\"{}.{}\"];/", a, b) + format!("s/let servers = \\[\"localhost:3000\"\\];/let servers = [\"{}.{}\"];/", a, b) ])?; fs::write(&index_html_path, index_html_patched.as_bytes())?; diff --git a/spacetime_rs/src/main.rs b/spacetime_rs/src/main.rs index 11fa71adfb218478472dfdfcacfdcca79882e6b3..dc92b53ba0ebcfec04fe0f5387f93e9f537cd692 100644 --- a/spacetime_rs/src/main.rs +++ b/spacetime_rs/src/main.rs @@ -243,7 +243,7 @@ impl BuildCommandManager { } pub fn exec(&self, args: Vec) -> Result<(), Box> { - if args.len() < 2 || args[1] == "help" || args[1] == "h" { + if args.len() < 3 || args[1] == "help" || args[1] == "h" { self.help(); return Ok(()); }