Skip to content

Commit

Permalink
fix: logger nil pointer in instrumented_project_command_builder (#4461)
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi authored Apr 25, 2024
1 parent 5aaf8ad commit 2c6abc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/events/project_command_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -35,6 +36,7 @@ const (
)

func NewInstrumentedProjectCommandBuilder(
logger logging.SimpleLogging,
policyChecksSupported bool,
parserValidator *config.ParserValidator,
projectFinder ProjectFinder,
Expand Down Expand Up @@ -89,7 +91,8 @@ func NewInstrumentedProjectCommandBuilder(
scope,
terraformClient,
),
scope: scope,
Logger: logger,
scope: scope,
}
}

Expand Down
1 change: 1 addition & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) {
Router: router,
}
projectCommandBuilder := events.NewInstrumentedProjectCommandBuilder(
logger,
policyChecksEnabled,
validator,
&events.DefaultProjectFinder{},
Expand Down

0 comments on commit 2c6abc4

Please sign in to comment.