我有一些virtualenvwrapper掛鉤,我在~/.virtualenvs
(我爲$WORKON_HOME
變量定義的目錄)下創建。
我通常喜歡在版本控制下保存這樣的系統文件 - 例如,我有一個非常高度定製的bash配置文件~/Repos/dotfiles/bash_profile
,它符號鏈接到~/.bash_profile
。
然而,當我試圖~/Repos/dotfiles/virtualenvwrapper_hooks/
下移動virtualenvwrapper掛鉤,然後符號鏈接他們回到他們原來的文件名~/.virtualenvs/
下,我得到了下面的錯誤,當我打開了一個新的終端窗口:
stevedore.extension error calling 'user_scripts': [Errno 62] Too many levels of symbolic links: '/Users/yiqing/.virtualenvs/postactivate'
stevedore.extension [Errno 62] Too many levels of symbolic links: '/Users/yiqing/.virtualenvs/postactivate'
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 137, in _invoke_one_plugin
response_callback(func(e, *args, **kwds))
File "/Library/Python/2.7/site-packages/virtualenvwrapper/hook_loader.py", line 185, in invoke
ext.plugin(args)
File "/Library/Python/2.7/site-packages/virtualenvwrapper/user_scripts.py", line 143, in initialize
make_hook(get_path('$VIRTUALENVWRAPPER_HOOK_DIR', filename), comment)
File "/Library/Python/2.7/site-packages/virtualenvwrapper/user_scripts.py", line 124, in make_hook
f = open(filename, 'w')
IOError: [Errno 62] Too many levels of symbolic links: '/Users/yiqing/.virtualenvs/postactivate'
符號鏈接的整個目錄(rm -rf ~/.virtualenvs ; ln -sF ...
)也不起作用,因爲當我試圖製表完整的命令,它給回:
NOTE: Virtual environments directory /Users/yiqing/.virtualenvs does not exist. Creating...
mkdir: /Users/yiqing/.virtualenvs: Input/output error
短創造了01一個Git回購,我想知道在版本控制下保留這些鉤子有哪些其他選項?