aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-05-17 10:29:16 +0000
committerFuwn <[email protected]>2021-05-17 10:29:16 +0000
commit8809d07647945cc7b0467dece2e5f4bf5a5fe655 (patch)
tree124d5f28eda1e92137fbca661313bf073e341201
parentfix(db): diesel schema path (diff)
downloadwhirl-8809d07647945cc7b0467dece2e5f4bf5a5fe655.tar.xz
whirl-8809d07647945cc7b0467dece2e5f4bf5a5fe655.zip
feat(cli/clean): don't create log file on clean subcommand
-rw-r--r--whirl_core/src/main.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/whirl_core/src/main.rs b/whirl_core/src/main.rs
index 8a1874a..9035ff9 100644
--- a/whirl_core/src/main.rs
+++ b/whirl_core/src/main.rs
@@ -16,6 +16,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let logger = flexi_logger::Logger::with_str(calculate_log_level());
if std::env::var("LOG_FILE").unwrap_or_else(|_| "true".to_string()) == "false"
|| !Config::get().whirlsplash.log.file
+ || std::env::args().collect::<Vec<_>>()[1] == "clean" // Cheeky as all hell.
{
logger.start()?;
} else {