diff --git a/internal/site/site.go b/internal/site/site.go index 5ae76abf..42d41630 100644 --- a/internal/site/site.go +++ b/internal/site/site.go @@ -58,8 +58,6 @@ func (s *Site) ExportSiteConfig(consoleOutput *console.Console) error { return err } - fmt.Println(localSettings.Environment) - checkCommand := []string{ "option", "get", @@ -168,6 +166,14 @@ func (s *Site) LoadSite( return err } + // Always make sure we set the correct type, even if a config file isn't available. + if cmd.Use != "start" { + s.Settings.Type, err = s.DetectType() + if err != nil { + return err + } + } + // Fail now if we have a command that requires a completed site and we haven't started it before if !isSite && arrayContains(commandsRequiringSite, cmd.Use) { return fmt.Errorf("the current site you are trying to work with does not exist. Use `kana start` to initialize")