-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Description:
Currently, the system that reads user.yaml does not correctly parse the last user entry if the cursor or file does not end with a newline. This leads to the last user in the configuration being ignored.
Example user.yaml:
users:
- username: user1
- username: user2
- username: user3
If the file does not have a newline after user3, the last user is not added by the system.
Expected behavior:
- All users listed in
user.yamlshould be loaded, regardless of whether the file ends with a newline or not.
Steps to reproduce:
- Update the
user.yamlfile as shown above, without a newline after the last user. - Run the application(services/add_user.sh) or script that loads users from user.yaml.
- Observe that the last user (user3) is not loaded.
Proposed solution:
- Ensure the YAML parser reads the last element even if the file does not end with a newline.
- Alternatively, validate the file during startup and automatically append a newline if missing.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers