git diff 与 opendiff 给出“无法启动 FileMerge”错误
我将 git 配置为使用 ~/bin/opendiff-git.sh 作为我的外部 diff 工具。该脚本如下所示:
opendiff $2 $5
当我尝试从命令行执行 git diff 时,我收到以下消息:
2011-02-18 13:58:55.532 opendiff[27959:60f] exception raised trying to run FileMerge: launch path not accessible
2011-02-18 13:58:55.535 opendiff[27959:60f] Couldn't launch FileMerge
external diff died, stopping at source/some_file.m.
发生了什么事?这已经工作了好几个月了,但最近停止工作了。
I have git configured to use ~/bin/opendiff-git.sh as my external diff tool. That script looks like this:
opendiff $2 $5
When I try and do a git diff from the command line, I get this message:
2011-02-18 13:58:55.532 opendiff[27959:60f] exception raised trying to run FileMerge: launch path not accessible
2011-02-18 13:58:55.535 opendiff[27959:60f] Couldn't launch FileMerge
external diff died, stopping at source/some_file.m.
What's going on? This has worked for many months, but stopped working recently.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
因此,在我删除了 beta 开发人员文件夹以尝试解决此问题(无法修复与合并工具一起使用)后,我在命令行中偶然发现了这一点:
原来您可以设置您需要它使用的开发人员路径:
看起来就像安装测试版一样,自动将该路径设置为测试版。要修复它,请运行以下命令:
这为我修复了它。
下面更新
Ying 的评论非常重要,足以包含在答案中。从 Xcode 4.3 开始,该文件夹的位置已更改为应用程序包内:
So AFTER I deleted the beta developer folder to try and solve this (couldn't get the fix to work with merge tool) I stumbled upon this in the command line:
Turns out you can set the developer path you need it to use:
Looks like installing the beta had automatically set that path to beta. To fix it, run this:
That fixed it for me.
Update
Ying's comment below was important enough to include in the answer. From Xcode 4.3 on, the location of the folder has changed to inside the application package:
如果您安装了两个 SDK,并且最新(可能是测试版)版本未安装系统工具,则
opendiff
等某些工具可能会崩溃。您一次只能安装一组系统工具,因此您必须选择哪个 SDK/安装有它。我通过使用安装了系统工具的 Developer 文件夹中的opendiff
路径解决了这个问题。就我而言,我安装了以下 Xcode:
当前稳定版本(安装了系统工具)
最新测试版(未安装系统工具)
我的
~/bin/ opendiff-git.sh
脚本现在看起来像这样:If you have two SDKs installed, and the latest (presumably beta) version doesn't have the System Tools installed, some tools like
opendiff
can break. You can only have one set of System Tools installed at a time, so you have to choose which SDK/installation has it. I fixed this problem by using the path ofopendiff
that is in the Developer folder that had the system tools installed.In my case, I have the following Xcode installations:
Current stable release (with System Tools installed)
Latest beta (without System Tools installed)
My
~/bin/opendiff-git.sh
script now looks like this:首先是xcode的安装路径从4.3开始修改了,所以必须重新选择xcode路径
完整指南在下面的链接中:
http://useyourloaf.com/blog/2012/2 /17/更新到xcode-43.html
first the reason is xcode's installation path modified since 4.3, so must reselect xcode path
full guide is in below link:
http://useyourloaf.com/blog/2012/2/17/updating-to-xcode-43.html