mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 18:31:00 +00:00
Merge pull request #596 from epipho/config-error
Exit app if config cannot be read correctly
This commit is contained in:
commit
72e8f80f5e
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"flag"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/drone/config"
|
||||
|
@ -83,7 +84,11 @@ func main() {
|
|||
// Parses config data. The config data can be stored in a config
|
||||
// file (.toml format) or environment variables, or a combo.
|
||||
config.SetPrefix("DRONE_")
|
||||
config.Parse(conf)
|
||||
err := config.Parse(conf)
|
||||
if err != nil {
|
||||
log.Errf("Unable to parse config: %v", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Setup the remote services. We need to execute these to register
|
||||
// the remote plugins with the system.
|
||||
|
|
Loading…
Reference in a new issue