git diff with opendiff gives “Couldn't launch FileMerge” error

后端 未结 3 1996
[愿得一人]
[愿得一人] 2021-01-30 11:49

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 gi

3条回答
  •  天涯浪人
    2021-01-30 12:48

    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:

    Error: No developer directory found at /Developer Beta. Run /usr/bin/xcode-select to update the developer directory path.
    

    Turns out you can set the developer path you need it to use:

    Usage: xcode-select -print-path
       or: xcode-select -switch 
       or: xcode-select -version
    Arguments:
       -print-path                     Prints the path of the current Xcode folder
       -switch      Sets the path for the current Xcode folder
       -version  
    

    Looks like installing the beta had automatically set that path to beta. To fix it, run this:

    sudo /usr/bin/xcode-select -switch /Developer
    

    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:

    sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/
    

提交回复
热议问题