26 lines
491 B
Go
26 lines
491 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"miasma-installer/tui"
|
|
"os"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
)
|
|
|
|
func main() {
|
|
p := tea.NewProgram(tui.NewModel(), tea.WithAltScreen())
|
|
|
|
if _, err := p.Run(); err != nil {
|
|
fmt.Printf("An error has occured during installation: %v\n", err)
|
|
os.Exit(1)
|
|
}
|
|
|
|
finalModel, _ := p.Run()
|
|
if root, ok := finalModel.(tui.RootModel); ok {
|
|
if root.State == tui.StateFinished {
|
|
fmt.Println("\nMiasma OS Installation Complete! Please reboot.")
|
|
}
|
|
}
|
|
}
|