Skip to content

Commit 30bb029

Browse files
authored
Look for Sublime Merge inside its real bundle (#809)
The one macOS path listed was /Applications/smerge.app/Contents/MacOS/, which names neither the bundle nor the directory the command line tool is in. The bundle is "Sublime Merge.app", and smerge lives under Contents/SharedSupport/bin - MacOS holds the GUI binary. So a Mac install was never found by directory search, and resolved only for someone who had put smerge on PATH themselves. Additive: the correct path is searched first and the old one is kept, so nothing that resolves today stops resolving. Not verified against an install - no Mac here - so this rests on Sublime Merge's documented layout rather than on having watched it resolve.
1 parent 1ac9267 commit 30bb029

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

docs/diff-tool.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,6 +1368,7 @@ DiffTools.UseOrder(DiffTool.SublimeMerge);
13681368
mergetool "tempFile.txt" "targetFile.txt"
13691369
```
13701370
* Scanned paths:
1371+
* `/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge`
13711372
* `/Applications/smerge.app/Contents/MacOS/smerge`
13721373
* `%PATH%smerge`
13731374

src/DiffEngine.Tests/diffTools.include.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,6 +1233,7 @@ DiffTools.UseOrder(DiffTool.SublimeMerge);
12331233
mergetool "tempFile.txt" "targetFile.txt"
12341234
```
12351235
* Scanned paths:
1236+
* `/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge`
12361237
* `/Applications/smerge.app/Contents/MacOS/smerge`
12371238
* `%PATH%smerge`
12381239

src/DiffEngine/Implementation/SublimeMerge.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ public static Definition SublimeMerge()
2727
Osx: new(
2828
"smerge",
2929
launchArguments,
30+
// The bundle is "Sublime Merge.app", and the command line tool inside it lives
31+
// under SharedSupport/bin rather than MacOS - which holds the GUI binary. The
32+
// one path listed here named neither, so a Mac install was never found by
33+
// directory search and only resolved for someone who had put smerge on PATH
34+
// themselves
35+
"/Applications/Sublime Merge.app/Contents/SharedSupport/bin/",
3036
"/Applications/smerge.app/Contents/MacOS/")),
3137
Notes: " * While SublimeMerge is not MDI, it is treated as MDI since it uses a single shared process to managing multiple windows. As such it is not possible to close a Sublime merge process for a specific diff. [Vote for this feature](https://github.com/sublimehq/sublime_merge/issues/1168)");
3238
}

0 commit comments

Comments
 (0)