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

fix: accept platforms name contained equal sigh #2160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions cmd/platforms.go
Expand Up @@ -14,9 +14,12 @@ func (i *Input) newPlatforms() map[string]string {

for _, p := range i.platforms {
pParts := strings.Split(p, "=")
if len(pParts) == 2 {
platforms[strings.ToLower(pParts[0])] = pParts[1]
}
// pop operation
pValue := pParts[len(pParts)-1]
pParts = pParts[:len(pParts)-1]

pName := strings.Join(pParts, "=")
platforms[strings.ToLower(pName)] = pValue

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we can have tests for this? Not sure if there is a rule where you should add tests for each new feature.

}
return platforms
}