mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-19 12:49:18 +00:00
Fix agent config reading error handling (#2008)
Currently for non-existing config file it would report error instead of info message
This commit is contained in:
@@ -38,7 +38,7 @@ func readAgentConfig(agentConfigPath string) AgentConfig {
|
||||
|
||||
rawAgentConf, err := os.ReadFile(agentConfigPath)
|
||||
if err != nil {
|
||||
if !os.IsNotExist(err) {
|
||||
if os.IsNotExist(err) {
|
||||
log.Info().Msgf("no agent config found at '%s', start with defaults", agentConfigPath)
|
||||
} else {
|
||||
log.Error().Err(err).Msgf("could not open agent config at '%s'", agentConfigPath)
|
||||
|
Reference in New Issue
Block a user