--- pkg/tui/models_update.go +++ pkg/tui/models_update.go @@ -225,6 +225,26 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } else if m.state == StateRestoreConfig { m.setupConfigOptionsList() m.state = StateConfigOptions return m, nil + } else if m.state == StateFileAssociations && !m.installing { + outputChan := make(chan string, 100) + m.installOutput = []string{} + m.state = StateInstalling + m.currentCommand = "Configuring File Associations" + return m, func() tea.Msg { + go func() { + cr := installer.NewCommandRunner(outputChan, nil) + var err error + if m.platformInfo != nil && m.platformInfo.OSType == "windows" && m.installer != nil { + err = cr.RunFileAssociationsSetup() + } else { + cr.outputChan <- "File associations only available on Windows" + err = fmt.Errorf("not supported on this platform") + } + installDone <- err + close(outputChan) + }() + return saveChannelsMsg{outputChan: outputChan, installDone: installDone} + } } else if m.state == StateSuccess {