Skip to content

fix: avoid double searchPath call, use full path for editors on Windows#2460

Open
Bhumika-SN wants to merge 2 commits into
jbangdev:mainfrom
Bhumika-SN:fix/edit-intellij-windows-gitbash-v2
Open

fix: avoid double searchPath call, use full path for editors on Windows#2460
Bhumika-SN wants to merge 2 commits into
jbangdev:mainfrom
Bhumika-SN:fix/edit-intellij-windows-gitbash-v2

Conversation

@Bhumika-SN
Copy link
Copy Markdown
Contributor

Problem

Fixes #1340

On Windows with Git Bash, jbang edit finds IntelliJ's idea on
PATH correctly but then tries to execute just "idea" instead of
the full path like "idea.bat".

findEditorsOnPath() was calling searchPath() twice — once in
filter and once in map — which is inefficient.

Fix

Use a single map + filter to call searchPath() only once.
On Windows, return the full resolved path with extension so Git
Bash can execute it correctly.

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.

edit: IntelliJ found in PATH won't start on Windows

1 participant