Skip to content

Fix bug in module user systemd unit handling#16

Merged
kiviktnm merged 2 commits intokiviktnm:mainfrom
oatmealraisin:user_services
Jan 25, 2025
Merged

Fix bug in module user systemd unit handling#16
kiviktnm merged 2 commits intokiviktnm:mainfrom
oatmealraisin:user_services

Conversation

@oatmealraisin
Copy link
Copy Markdown

Simple fix for a bug I noticed in my own usage.

update clobbers the existing set upon key collisions. I have most 'applications' set up as modules, so each one that ran a user unit as my user overwrote the previous set of user units.

This is a draft while I write unit tests for this. I wanted to ask if I could add pytest as a dev dependency. I think the suites you have would get more clarity from the fixture pattern that pytest provides. If you'd prefer to stick to stdlib, that's fine.

@oatmealraisin
Copy link
Copy Markdown
Author

Also lmao how do I draft in github

@oatmealraisin oatmealraisin changed the title DRAFT: Fix bug in module user systemd unit handling Fix bug in module user systemd unit handling Jan 23, 2025
@oatmealraisin
Copy link
Copy Markdown
Author

I've added a test for this fix, no longer in draft

@kiviktnm
Copy link
Copy Markdown
Owner

Looks good! I don't use a ton of user services so I never caught that. Thanks! I'll merge this.

I'll look into updating testing later, but I'd prefer to stay with stdlib for now.

@kiviktnm kiviktnm merged commit 82a1fbd into kiviktnm:main Jan 25, 2025
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