Fix tests and squelch warning if config file not found

This commit is contained in:
James Mills 2023-03-27 00:46:09 +10:00
parent f64268f9cd
commit dfaa5cd490
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
5 changed files with 7 additions and 5 deletions

View File

@ -709,8 +709,10 @@ func initConfig() {
// If a config file is found, read it in.
if err := viper.ReadInConfig(); err != nil {
if _, ok := err.(viper.ConfigFileNotFoundError); !ok {
log.WithError(err).Warnf("error reading config %s (using defaults)", viper.ConfigFileUsed())
}
}
}
// ParseIgnoreFile parsers a .zsignore file or uses the default if an error occurred

View File

@ -2,7 +2,7 @@
<head>
<title>Hello World</title>
</head>
<body><h1 id="hello-world">Hello World <a class="anchor" href="#hello-world"></a></h1>
<body><h1 id="hello-world">Hello World <a class="anchor" href="#hello-world"> </a></h1>
<p>Hello World!</p>
</body>
</html>

View File

@ -1,5 +1,5 @@
<html>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"></a></h1>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
<p>Simple page</p>
</body>
</html>

View File

@ -1,5 +1,5 @@
<html>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"></a></h1>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
<p>Simple page</p>
</body>
</html>

View File

@ -2,7 +2,7 @@
<head>
<title>Simple</title>
</head>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"></a></h1>
<body><h1 id="simple">Simple <a class="anchor" href="#simple"> </a></h1>
<p>Simple page</p>
</body>
</html>