Skip to content

Commit

Permalink
Fix error appearing unnecessarily in epic game importing view
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed Jul 7, 2024
1 parent 2d84e01 commit 668f322
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Mythic/Views/Navigation/Library/Extensions/EpicImport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,9 @@ extension LibraryView.GameImportView {
isPresented = false
}

let commandError = output.stderr.trimmingPrefix("ERROR: ")
if !commandError.isEmpty {
if let match = try? Regex(#"ERROR: (.*)"#).firstMatch(in: output.stderr) {
isOperating = false
errorDescription = .init(commandError)
errorDescription = .init(match[1].substring ?? "Unknown Error")
isErrorAlertPresented = true
}

Expand Down

0 comments on commit 668f322

Please sign in to comment.