Fix: avoid silent fatalities

demo: https://tcp.ac/i/JMSUc.gif
This commit is contained in:
kayos@tcp.direct 2024-06-17 00:30:24 -07:00
parent 3337efcb8f
commit 395f5ab6bc
No known key found for this signature in database
GPG key ID: 4B841471B4BEE979
13 changed files with 115 additions and 78 deletions

View file

@ -6,9 +6,10 @@ package internal
import (
"os"
"github.com/HikariKnight/ls-iommu/pkg/errorcheck"
"github.com/HikariKnight/quickpassthrough/internal/pages"
tea "github.com/charmbracelet/bubbletea"
"github.com/HikariKnight/quickpassthrough/internal/common"
"github.com/HikariKnight/quickpassthrough/internal/pages"
)
// This is where we build everything
@ -16,7 +17,7 @@ func Tui() {
// Log all errors to a new logfile (super useful feature of BubbleTea!)
_ = os.Rename("quickpassthrough_debug.log", "quickpassthrough_debug_old.log")
logfile, err := tea.LogToFile("quickpassthrough_debug.log", "")
errorcheck.ErrorCheck(err, "Error creating log file")
common.ErrorCheck(err, "Error creating log file")
defer logfile.Close()
// New WIP Tui