brewのgit archive-allでエラーが出る時の対処


症状: こんなエラーが出る

$ git archive-all --prefix=pf3gnuchains-20140426 pf3gnuchains-20140426.tgz
Traceback (most recent call last):
  File "/usr/local/bin/git-archive-all", line 432, in <module>
    help="prepend PREFIX to each filename in the archive. OUTPUT_FILE name is used by default to avoid tarbomb")
  File "/Users/monaka/.pythonbrew/pythons/Python-2.7/lib/python2.7/optparse.py", line 1018, in add_option
    raise TypeError, "invalid arguments"
TypeError: invalid arguments

対処: オレオレPythonを切る

たぶん,brew が管轄していないPythonが悪さをしている.pythonbrew の場合は,下記のようにして,一時的にオレオレ Python を無効にする.

pythonbrew off