return err
}
+ if len(conf.configs.LoadingInfo.ConfigFiles) == 0 {
+ return errors.New("Unable to locate config file or config directory. Perhaps you need to create a new site.\nRun `hugo help new` for details.")
+ }
+
c.conf = conf
if c.onConfigLoaded != nil {
if err := c.onConfigLoaded(false); err != nil {
--- /dev/null
+
+hugo
+! stderr .
+
+-- config/_default/hugo.toml --
+baseURL = "https://example.com/"
\ No newline at end of file
hugo --quiet
! stdout .
+-- hugo.toml --
+title = "Hugo Test"
-- myconfig.toml --
baseURL = "http://example.org/"
disableKinds = ["RSS", "sitemap", "robotsTXT", "404", "taxonomy", "term"]
--- /dev/null
+
+! hugo
+
+stderr 'Unable to locate config file or config directory'
\ No newline at end of file