Skip to content

fix(service): fix the return value of ListRepositories#1930

Merged
imobachgs merged 2 commits intomasterfrom
fix-list-repositories
Jan 21, 2025
Merged

fix(service): fix the return value of ListRepositories#1930
imobachgs merged 2 commits intomasterfrom
fix-list-repositories

Conversation

@imobachgs
Copy link
Contributor

@imobachgs imobachgs commented Jan 21, 2025

Problem

ListRepositories D-Bus method just crashes. It is expected to return an array with contains the
return value as its first element. However, when there are no repositories, it just returns an empty
array. It causes Ruby D-Bus to fail because it cannot serialize a nil value.

Actually, the old code only works where there is a single repository.

Solution

Fix the return value. For comparison, you can check the following ListPatterns method.

Testing

  • Tested manually

Copy link
Contributor

@ancorgs ancorgs left a comment

Choose a reason for hiding this comment

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

LGTM

@imobachgs imobachgs merged commit a2ebb64 into master Jan 21, 2025
7 checks passed
@imobachgs imobachgs deleted the fix-list-repositories branch January 21, 2025 19:32
@imobachgs imobachgs mentioned this pull request Feb 26, 2025
imobachgs added a commit that referenced this pull request Feb 26, 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