Skip to content

Conversation

@fasuizu-br
Copy link

Summary

When get_session_id() returns an empty string, logout() skips the D-Bus TerminateSession call but still falls through to loginctl kill-session "", which always fails. Added an early return with a clear error message when session_id is empty.

Closes #21

Test plan

  • cargo check --target aarch64-apple-darwin passes
  • CI validation on Linux target

When get_session_id() returns an empty string, the fallback
`loginctl kill-session ""` would always fail. Return a clear error
instead of silently calling loginctl with an empty argument.

Closes risoflora#21
@fasuizu-br fasuizu-br force-pushed the fix/issue-21-empty-session-id branch from c139770 to 146e831 Compare January 29, 2026 07:11
@AdrianEddy AdrianEddy merged commit 2e38f67 into risoflora:main Jan 29, 2026
4 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.

Bug: logout() fallback may call loginctl with empty session_id

2 participants