MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / HandleConfigWizard

Function HandleConfigWizard

internal/bootstrap/bootstrap.go:538–551  ·  view source on GitHub ↗

HandleConfigWizard launches the configuration wizard.

(cfg *config.Config, configPath string, activeProfile string)

Source from the content-addressed store, hash-verified

536
537// HandleConfigWizard launches the configuration wizard.
538func HandleConfigWizard(cfg *config.Config, configPath string, activeProfile string) error {
539 res := components.LaunchConfigWizard(cfg, configPath, activeProfile)
540
541 switch {
542 case res.SopsEncrypted:
543 fmt.Println(display.IconText("✅", fmt.Sprintf("Configuration saved and encrypted with SOPS: %s", configPath), cfg.ShowIcons))
544 case res.Saved:
545 fmt.Println(display.IconText("✅", "Configuration saved.", cfg.ShowIcons))
546 case res.Canceled:
547 fmt.Println(display.IconText("🚪", "Exiting.", cfg.ShowIcons))
548 }
549
550 return nil
551}
552
553// handleStartupError provides user-friendly error messages for startup failures.
554func handleStartupError(err error, cfg *config.Config) error {

Callers 2

runConfigWizardFunction · 0.92
BootstrapFunction · 0.85

Calls 2

LaunchConfigWizardFunction · 0.92
IconTextFunction · 0.92

Tested by

no test coverage detected