From 2795a542a09e0e3a4129eddbbee78ce449b32405 Mon Sep 17 00:00:00 2001 From: DastInDark <2350416+hitenkoku@users.noreply.github.com> Date: Fri, 29 Jul 2022 22:19:44 +0900 Subject: [PATCH] fixed error when invalid profile name --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e4199355..49ef119d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ use hayabusa::detections::pivot::PivotKeyword; use hayabusa::detections::pivot::PIVOT_KEYWORD; use hayabusa::detections::rule::{get_detection_keys, RuleNode}; use hayabusa::omikuji::Omikuji; +use hayabusa::options::profile::PROFILES; use hayabusa::options::{level_tuning::LevelTuning, update_rules::UpdateRules}; use hayabusa::{afterfact::after_fact, detections::utils}; use hayabusa::{detections::configs, timeline::timelines::Timeline}; @@ -87,7 +88,9 @@ impl App { .unwrap(), ); } - + if PROFILES.is_none() { + return; + } let analysis_start_time: DateTime = Local::now(); // Show usage when no arguments. if std::env::args().len() == 1 {