Skip to content

Commit

Permalink
fix: get project info
Browse files Browse the repository at this point in the history
  • Loading branch information
Tpuljak committed Feb 7, 2024
1 parent fbad467 commit cceca93
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,15 @@ func (p DockerProvisioner) GetProjectInfo(project *types.Project) (*types.Projec
}
}

provisionerMetadata, err := utils.StructToProtobufStruct(info.Config.Labels)
if err != nil {
return nil, err
var provisionerMetadata *structpb.Struct = nil

if info != nil && info.Config != nil && info.Config.Labels != nil {
provisionerMetadata, err = utils.StructToProtobufStruct(info.Config.Labels)
if err != nil {
return nil, err
}
} else {
log.Warn("Could not get container labels for project: ", project.Name)
}

return &types.ProjectInfo{
Expand Down

0 comments on commit cceca93

Please sign in to comment.