Minor log parsing bug fixes (#402)

* fix java arg logic

* fix missing libraries detection for discord attached files

* change `\r\n` to `\n` in the entire log instead

---------

Co-authored-by: maskers <97827489+mskrss@users.noreply.github.com>
This commit is contained in:
maskers 2024-09-15 13:59:46 +03:00 committed by GitHub
parent fcbdab43d8
commit 342f85c963
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -123,9 +123,9 @@ fn java_option(log: &str) -> Issue {
if let Some(captures) = vm_option.captures(log) {
let title = if &captures[1] == "UseShenandoahGC" {
"Wrong Java Arguments"
} else {
"Java 8 and below don't support ShenandoahGC"
} else {
"Wrong Java Arguments"
};
return Some((
title.to_string(),

View file

@ -41,6 +41,8 @@ pub async fn handle(ctx: &Context, message: &Message, data: &Data) -> Result<()>
return Ok(());
};
let log = log.replace("\r\n", "\n");
let issues = issues::find(&log, data).await?;
let embed = {