我将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.到底怎么回事?这种方法已经工作了好几个月,但最近停止了工作。
发布于 2011-08-09 11:46:25
因此,在我删除了beta开发人员文件夹以尝试解决这个问题(无法使用merge工具进行修复)后,我在命令行中偶然发现了以下内容:
Error: No developer directory found at /Developer Beta. Run /usr/bin/xcode-select to update the developer directory path.事实证明,您可以设置需要使用的开发人员路径:
Usage: xcode-select -print-path
or: xcode-select -switch <xcode_folder_path>
or: xcode-select -version
Arguments:
-print-path Prints the path of the current Xcode folder
-switch <xcode_folder_path> Sets the path for the current Xcode folder
-version 看起来安装测试版已经自动将该路径设置为测试版。要修复它,请运行以下命令:
sudo /usr/bin/xcode-select -switch /Developer帮我修好了。
更新
英的下面的评论是足够重要的,包括在答案中。从Xcode 4.3开始,文件夹的位置已更改为应用程序包内:
sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/发布于 2011-02-18 11:08:42
如果您安装了两个SDK,而最新的(可能是测试版)版本没有安装系统工具,则opendiff等工具可能会崩溃。您一次只能安装一组系统工具,因此您必须选择哪个SDK/安装具有它。我通过使用安装了系统工具的Developer文件夹中的opendiff路径修复了这个问题。
在我的例子中,我安装了以下Xcode:
当前稳定版本(已安装系统工具)
/Developer最新测试版(未安装系统工具)
/Developer (iOS SDK XXX beta)我的~/bin/opendiff-git.sh脚本现在看起来像这样:
"/Developer/usr/bin/opendiff" $2 $5发布于 2012-02-22 16:52:28
首先,原因是xcode的安装路径从4.3开始修改,所以必须重新选择xcode路径
完整指南位于以下链接:http://useyourloaf.com/blog/2012/2/17/updating-to-xcode-43.html
https://stackoverflow.com/questions/5037230
复制相似问题