Open rakino opened 11 months ago
I have converted the conditions into a list of paths to be used for locate-file (which is what executable-find uses).
locate-file
executable-find
"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.
exec-path
exec-suffixes
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.
wakatime-find-binary
wakatime-prompt-cli-path
I have converted the conditions into a list of paths to be used for
locate-file
(which is whatexecutable-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
andexec-suffixes
to the paths and suffixes, there's no need to callexecutable-find
separately.