Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otherPortsAttributes should be the attributes directly #908

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/devcontainer/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ type DevContainerConfigBase struct {
PortsAttributes map[string]PortAttribute `json:"portAttributes,omitempty"`

// Set default properties that are applied to all ports that don't get properties from the setting `remote.portsAttributes`.
OtherPortsAttributes map[string]PortAttribute `json:"otherPortsAttributes,omitempty"`
OtherPortsAttributes *PortAttribute `json:"otherPortsAttributes,omitempty"`

// Controls whether on Linux the container's user should be updated with the local user's UID and GID. On by default when opening from a local folder.
UpdateRemoteUserUID *bool `json:"updateRemoteUserUID,omitempty"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/devcontainer/config/merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ func MergeConfiguration(config *DevContainerConfig, imageMetadataEntries []*Imag
return mergedConfig, nil
}

func mergeOtherPortsAttributes(entries []*ImageMetadata) map[string]PortAttribute {
func mergeOtherPortsAttributes(entries []*ImageMetadata) *PortAttribute {
for _, entry := range entries {
if len(entry.OtherPortsAttributes) > 0 {
if entry.OtherPortsAttributes != nil {
return entry.OtherPortsAttributes
}
}
Expand Down
Loading