Skip to content

Commit

Permalink
Merge pull request #1462 from Yamato-Security/1459-results-get-output…
Browse files Browse the repository at this point in the history
…ted-after-scanning-has-finished

fix: output completion message when scan is finished
  • Loading branch information
YamatoSecurity authored Oct 25, 2024
2 parents c1f5feb + e7554d6 commit 0f4fc84
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG-Japanese.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# 変更点

## x.x.x [xxxx/xx/xx]

**バグ修正:**

- `csv-timeline``json-timeline`コマンドで、結果をターミナルに出力すると、プログレスバーの後にいくつかの結果が表示されていた。 (#1459) (@fukusuket)

## 2.18.0 [2024/10/23] - SecTor Release

**新機能:**
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changes

## x.x.x [xxxx/xx/xx]

**Bug Fixes:**

- Some results would be displayed after the progress bar when outputting results to the terminal with `csv-timeline` and `json-timeline`. (#1459) (@fukusuket)

## 2.18.0 [2024/10/23] - SecTor Release

**New Features:**
Expand Down
4 changes: 3 additions & 1 deletion src/afterfact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,9 @@ fn emit_csv_inner(
if !afterfact_writer.display_flag {
afterfact_writer.csv_writer.flush()?;
}

if json_output_flag && stored_static.output_path.is_none() {
println!()
}
Ok(())
}

Expand Down
11 changes: 7 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1607,9 +1607,6 @@ impl App {
pb.inc(1);
}
}
pb.finish_with_message(
"Scanning finished. Please wait while the results are being saved.\r\n",
);
CHECKPOINT
.lock()
.as_mut()
Expand All @@ -1636,7 +1633,6 @@ impl App {
|| stored_static.pivot_keyword_list_flag
|| stored_static.computer_metrics_flag)
{
println!();
let mut log_records = detection.add_aggcondition_msges(&self.rt, stored_static);
if stored_static.is_low_memory {
let empty_ids = HashSet::new();
Expand All @@ -1653,6 +1649,13 @@ impl App {
afterfact_info.tl_starttime = tl.stats.start_time;
afterfact_info.tl_endtime = tl.stats.end_time;

let msg = if stored_static.output_path.is_some() {
"Scanning finished. Please wait while the results are being saved.\n"
} else {
"Scanning finished.\n"
};
pb.finish_with_message(msg);

// output afterfact
if stored_static.is_low_memory {
afterfact::output_additional_afterfact(
Expand Down

0 comments on commit 0f4fc84

Please sign in to comment.