diff options
| author | Fuwn <[email protected]> | 2021-05-05 18:20:34 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-05 18:20:34 +0000 |
| commit | b4e826012344736403f2e4ea44c1a3ff881a939f (patch) | |
| tree | 2849cbc2cab9d346ae95403e3eda177929b341d7 /src | |
| parent | feat(make): use cargo-make instead of gnu make (diff) | |
| download | whirl-b4e826012344736403f2e4ea44c1a3ff881a939f.tar.xz whirl-b4e826012344736403f2e4ea44c1a3ff881a939f.zip | |
build(make): create watchable make task
Diffstat (limited to 'src')
| -rw-r--r-- | src/subs.rs | 11 |
1 files changed, 9 insertions, 2 deletions
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(); + } } |