-
-
Notifications
You must be signed in to change notification settings - Fork 190
fix: use full executable path for editors on Windows in Git BashFix/edit intellij windows gitbash #2451
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
fix: use full executable path for editors on Windows in Git BashFix/edit intellij windows gitbash #2451
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -379,7 +379,17 @@ private static void setupEditor(Path editorBinPath, Path dataPath) throws IOExce | |
| } | ||
|
|
||
| private static List<String> findEditorsOnPath() { | ||
| return Arrays.stream(knownEditors).filter(e -> Util.searchPath(e) != null).collect(Collectors.toList()); | ||
| return Arrays.stream(knownEditors) | ||
| .filter(e -> Util.searchPath(e) != null) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is going to 2x the calls to searchPath() that does not seem right.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't we simply return the right name ? idea.bat ? or exec it shell? |
||
| .map(e -> { | ||
| Path found = Util.searchPath(e); | ||
| // On Windows, use the full path with extension so Git Bash can execute it | ||
| if (Util.isWindows() && found != null) { | ||
| return found.toString(); | ||
| } | ||
| return e; | ||
| }) | ||
| .collect(Collectors.toList()); | ||
| } | ||
|
|
||
| private static void showStartingMsg(String ed, boolean showConfig) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,6 +140,22 @@ public static List<ArtifactInfo> findDependenciesByHash(String depsHash) { | |
|
|
||
| public static void clear() { | ||
| depCache = null; | ||
| // Also clear the dependency cache JSON file from disk | ||
| try { | ||
| Path cacheFile = Settings.getCacheDependencyFile(); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this does not seem related to this issue? |
||
| if (Files.exists(cacheFile)) { | ||
| Util.verboseMsg("Deleting dependency cache file: " + cacheFile); | ||
| Files.deleteIfExists(cacheFile); | ||
| } | ||
| // Also clear the depcache directory containing actual JARs | ||
| Path depCacheDir = Settings.getCacheDir(dev.jbang.Cache.CacheClass.deps); | ||
| if (Files.exists(depCacheDir)) { | ||
| Util.verboseMsg("Deleting dependency cache dir: " + depCacheDir); | ||
| Util.deletePath(depCacheDir, true); | ||
| } | ||
| } catch (IOException e) { | ||
| Util.errorMsg("Could not clear dependency cache files", e); | ||
| } | ||
| } | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this overlaps with #2450