1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

un-gitignore dankinstall

This commit is contained in:
bbedward
2025-11-12 20:36:50 -05:00
parent e8510b925e
commit 50cdd68b7b
3 changed files with 52 additions and 8 deletions

View File

@@ -36,11 +36,7 @@ jobs:
run: go test -v ./...
- name: Build dms
run: |
cd cmd/dms
go build -v .
run: go build -v ./cmd/dms
- name: Build dankinstall
run: |
cd cmd/dankinstall
go build -v .
run: go build -v ./cmd/dankinstall

2
.gitignore vendored
View File

@@ -137,5 +137,3 @@ go.work.sum
# .vscode/
bin/
dankinstall
/dms

View File

@@ -0,0 +1,50 @@
package main
import (
"fmt"
"os"
"github.com/AvengeMedia/DankMaterialShell/backend/internal/logger"
"github.com/AvengeMedia/DankMaterialShell/backend/internal/tui"
tea "github.com/charmbracelet/bubbletea"
)
var Version = "dev"
func main() {
fileLogger, err := logger.NewFileLogger()
if err != nil {
fmt.Printf("Warning: Failed to create log file: %v\n", err)
fmt.Println("Continuing without file logging...")
}
logFilePath := ""
if fileLogger != nil {
logFilePath = fileLogger.GetLogPath()
fmt.Printf("Logging to: %s\n", logFilePath)
defer func() {
if err := fileLogger.Close(); err != nil {
fmt.Printf("Warning: Failed to close log file: %v\n", err)
}
}()
}
model := tui.NewModel(Version, logFilePath)
if fileLogger != nil {
fileLogger.StartListening(model.GetLogChan())
}
p := tea.NewProgram(model, tea.WithAltScreen())
if _, err := p.Run(); err != nil {
fmt.Printf("Error running program: %v\n", err)
if logFilePath != "" {
fmt.Printf("\nFull logs are available at: %s\n", logFilePath)
}
os.Exit(1)
}
if logFilePath != "" {
fmt.Printf("\nFull logs are available at: %s\n", logFilePath)
}
}