Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify wakatime-find-binary with locate-file. #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rakino
Copy link

@rakino rakino commented Jul 19, 2023

I have converted the conditions into a list of paths to be used for locate-file (which is what executable-find uses).

"wakatime-cli-windows-amd64.exe" is handled in the form of a "-windows-amd64.exe" suffix, but the change has not been tested on Windows.

Since I have added exec-path and exec-suffixes to the paths and suffixes, there's no need to call executable-find separately.

@rakino
Copy link
Author

rakino commented Jul 19, 2023

I think it's better not to fallback to PROGRAM in wakatime-find-binary, since it has been searched in all possible paths. Returning a value in such a case would also prevent the wakatime-prompt-cli-path call.

@rakino rakino force-pushed the simplify-wakatime-find-binary branch from 69381c0 to bd437b9 Compare July 19, 2023 10:55
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.

1 participant