Skip to content

Commit

Permalink
fix boolean condition not matching its error message
Browse files Browse the repository at this point in the history
  • Loading branch information
majewsky committed Oct 18, 2024
1 parent 2bcfa3a commit 02dca7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
}
}

0 comments on commit 02dca7b

Please sign in to comment.