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

blueprint: return nil instead of empty user slice in GetUsers() #889

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

pastalian
Copy link
Contributor

Callers of GetUser() do not expect to receive an empty slice, which is causing unexpected condition handling.

if customizations.GetUsers() != nil {
w := fmt.Sprintf("Please note that user customizations on %q image type are deprecated and will be removed in the near future\n", t.Name())

(customizations.GetUsers() != nil || customizations.GetGroups() != nil) {
return warnings, fmt.Errorf("edge-installer installer.kickstart.contents are not supported in combination with users or groups")

Callers of GetUser() do not expect to receive an empty slice, which is
causing unexpected condition handling.
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

Thanks for this. LGTM!

@achilleas-k achilleas-k added this pull request to the merge queue Sep 2, 2024
Merged via the queue into osbuild:main with commit cfa7280 Sep 2, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants