launch-editor
launch-editor copied to clipboard
fix: strict exact match of macOS process
This PR fixes a problem in which the search is not strictly an exact match in the part that searches for processes with an exact match.
In case running processes includes /Users/foo/Applications/IntelliJ IDEA.app/Contents/MacOS/idea, the original code will match this as well, since COMMON_EDITORS_OSX contains /Applications/IntelliJ IDEA.app/Contents/MacOS/idea.
This prevents finding editor installation not in /Applications, such as /Users/foo/Applications/**.
I addressed this by doing an exact match search on a \n separated list of output string.
This fixes #52.
Hey, I can confirm I tested that fix locally and it works. @sodatea would it be possible to merge that?