Skip to content

Conversation

sleiner
Copy link

@sleiner sleiner commented Aug 4, 2025

Fixes #1429

@sleiner sleiner requested a review from a team as a code owner August 4, 2025 09:32
@sleiner
Copy link
Author

sleiner commented Aug 4, 2025

There should probably be a test for this scenario - I can add one if anybody can tell me how to to do it :-)

@sleiner sleiner changed the title If group userGid exists, use its name [common-utils] If group userGid exists, use its name Aug 4, 2025
# Create or update a non-root user to match UID/GID.
group_name="${USERNAME}"
group_name=$(getent group "$USER_GID" | cut -d: -f3)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hello @sleiner

I am not sure if this would really solve the problem you had encountered as you have mentioned. It would probably fail while trying to create a new group for user someone as the gid will be passed on as 1000 which is already existing.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hello @sleiner ,

Thank you for the contribution. Please describe the fix in a detailed manner. Also add test here & to test you can use devcontainer features test command locally in the vscode terminal. Also please do a version bump

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.

common-utils fails for existing user with arbitrary group
2 participants