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

sync: metadata: value of removed key is set to the empty string #608

Closed
ee7 opened this issue May 21, 2022 · 0 comments · Fixed by #609
Closed

sync: metadata: value of removed key is set to the empty string #608

ee7 opened this issue May 21, 2022 · 0 comments · Fixed by #609
Assignees
Labels
cmd: sync kind: bug User-facing incorrect behavior priority: high More important

Comments

@ee7
Copy link
Member

ee7 commented May 21, 2022

The source_url property was removed from an exercise's metadata.toml file. When syncing a .meta/config.json file that already contained the source_url property, the value was set to the empty string (which causes configlet lint to indicate an error, since an empty string is not a valid URL).

We should remove the key/value pair instead.

Links:

@ee7 ee7 added kind: bug User-facing incorrect behavior cmd: sync priority: high More important labels May 21, 2022
@ee7 ee7 self-assigned this May 21, 2022
@ee7 ee7 closed this as completed in #609 Jun 1, 2022
ee7 added a commit that referenced this issue Jun 1, 2022
If a `source` or `source_url` key/value pair was removed from an
exercise's `metadata.toml` file in `exercism/problem-specifications`,
`configlet sync -u` would incorrectly set an existing corresponding
`.meta/config.json` value to the empty string.

This would cause `configlet lint` to indicate an error, because
a `source` value must be a non-blank string, and a `source_url` value
must be a URL.

Instead, make `configlet sync` remove any `source` or `source_url`
key/value pair that was removed upstream.

Refs: exercism/problem-specifications@05999f34ab02
Fixes: #608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd: sync kind: bug User-facing incorrect behavior priority: high More important
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant