fix: logger nil pointer in instrumented_project_command_builder (#4461)

This commit is contained in:
Christian Winther
2024-04-25 15:09:12 +02:00
committed by GitHub
parent 5aaf8ad4e6
commit 2c6abc44fb
2 changed files with 5 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import (
"github.com/runatlantis/atlantis/server/core/config/valid"
"github.com/runatlantis/atlantis/server/core/terraform"
"github.com/runatlantis/atlantis/server/logging"
"github.com/runatlantis/atlantis/server/metrics"
"github.com/pkg/errors"
@@ -35,6 +36,7 @@ const (
)
func NewInstrumentedProjectCommandBuilder(
logger logging.SimpleLogging,
policyChecksSupported bool,
parserValidator *config.ParserValidator,
projectFinder ProjectFinder,
@@ -89,7 +91,8 @@ func NewInstrumentedProjectCommandBuilder(
scope,
terraformClient,
),
scope: scope,
Logger: logger,
scope: scope,
}
}

View File

@@ -600,6 +600,7 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) {
Router: router,
}
projectCommandBuilder := events.NewInstrumentedProjectCommandBuilder(
logger,
policyChecksEnabled,
validator,
&events.DefaultProjectFinder{},