fix(setup): check for wl-copy instead of wl-clipboard command#970
Merged
fix(setup): check for wl-copy instead of wl-clipboard command#970
Conversation
Fixes #965 The wl-clipboard package provides wl-copy and wl-paste executables, not a wl-clipboard command. This caused the /setup command to report wl-clipboard as missing even when the package is installed. Changed dependency check to use 'check_command' field to specify the actual executable name (wl-copy) while still displaying the package name (wl-clipboard) to users.
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to 2af8839 in 37 seconds. Click for details.
- Reviewed
29lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. gptme/setup.py:509
- Draft comment:
Good fix for Wayland: specifying 'check_command': 'wl-copy' correctly checks for the actual executable while still displaying the package name 'wl-clipboard'. This ensures #965 is resolved. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. gptme/setup.py:524
- Draft comment:
Using dep.get('check_command', dep['name']) provides a clean fallback mechanism for dependency checks, ensuring backward compatibility. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
Workflow ID: wflow_kLsmvnZJYqsRrncu
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #965 - wl-clipboard dependency not found on setup
Problem
When users run
/setup, gptme reports wl-clipboard as missing even when it's installed because it checks for awl-clipboardexecutable that doesn't exist. Thewl-clipboardpackage provideswl-copyandwl-pasteexecutables instead.Solution
Added a
check_commandfield to the dependency definition that specifies the actual executable to check (wl-copy) while still displaying the package name (wl-clipboard) to users.Changes
check_commandfield to wl-clipboard dependency entrycheck_commandif provided, falling back tonameTesting
wl-copyis the primary executable that gets checkedwl-clipboardstill shown to users in outputImportant
Fixes
wl-clipboarddependency check insetup.pyby verifyingwl-copyexecutable in Wayland environments.wl-clipboardwas reported missing by checking forwl-copyinstead ofwl-clipboard.setup.pyto usecheck_commandif provided, otherwise defaults toname.check_commandfield towl-clipboarddependency entry insetup.py.wl-copyis checked in Wayland environments.wl-copyis checked andwl-clipboardis displayed to users.This description was created by
for 2af8839. You can customize this summary. It will automatically update as commits are pushed.