diff options
| -rw-r--r-- | Makefile.toml | 7 | ||||
| -rw-r--r-- | src/subs.rs | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/Makefile.toml b/Makefile.toml index 1949319..61799a5 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -53,3 +53,10 @@ args = ["${WORLDS_PATH}"] [tasks.runc] dependencies = ["start_client", "run"] + +[tasks.runw] +env = { "DISABLE_PROMPT" = true } +dependencies = ["checkf"] +command = "cargo" +args = ["run", "--", "run"] +watch = true diff --git a/src/subs.rs b/src/subs.rs index 80c11d4..df9531d 100644 --- a/src/subs.rs +++ b/src/subs.rs @@ -36,6 +36,13 @@ pub async fn run() -> ! { }), ]; - std::thread::sleep(std::time::Duration::from_secs(2)); - Prompt::handle(); + if std::env::var("DISABLE_PROMPT").unwrap_or("false".to_string()) == "true" { + info!("starting with prompt disabled"); + loop { + std::thread::sleep(std::time::Duration::default()); + } + } else { + std::thread::sleep(std::time::Duration::from_secs(2)); + Prompt::handle(); + } } |