From 02dca7bc23fd596e0edd978aa156c5d7cccdd138 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 18 Oct 2024 14:04:24 +0200 Subject: [PATCH] fix boolean condition not matching its error message --- internal/core/config.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/core/config.go b/internal/core/config.go index bc0fde0..6abbbac 100644 --- a/internal/core/config.go +++ b/internal/core/config.go @@ -253,12 +253,13 @@ func (c *Configuration) Validate() { // Validate CI workflow configuration. if ghwCfg.CI.Enabled { - if !ghwCfg.CI.Postgres { - logg.Fatal("githubWorkflow.ci.enabled must be set to 'true' when githubWorkflow.ci.postgres is enabled") - } if len(ghwCfg.CI.RunnerType) > 1 && !strings.HasPrefix(ghwCfg.CI.RunnerType[0], "ubuntu") { logg.Fatal("githubWorkflow.ci.runOn must only define a single Ubuntu based runner when githubWorkflow.ci.postgres is enabled") } + } else { + if ghwCfg.CI.Postgres { + logg.Fatal("githubWorkflow.ci.enabled must be set to 'true' when githubWorkflow.ci.postgres is enabled") + } } } }