所以,我试图检查铬,包括它的所有依赖关系。根据chromium网站,以下命令应该在我当前的工作目录中创建一个名为src的新文件夹。
我在我的depot_tools文件夹中发出此命令:
$fetch chromium --nosvn=True
但是,我收到一条错误消息,表明我不允许这样做。任何线索为什么?
这是实际的信息:
Running: gclient config --spec 'solutions = [{u'"'"'managed'"'"': False, u'"'"'name'"'"': u'"'"'src'"'"', u'"'"'url'"'"': u'"'"'https://chromium.googlesource.com/chromium/src.git'"'"', u'"'"'custom_deps'"'"': {}, u'"'"'deps_file'"'"': u'"'"'.DEPS.git'"'"', u'"'"'safesync_url'"'"': u'"'"''"'"'}]'
Traceback (most recent call last):
File "/usr/local/git/depot_tools/gclient.py", line 2012, in <module>
sys.exit(Main(sys.argv[1:]))
File "/usr/local/git/depot_tools/gclient.py", line 2000, in Main
return dispatcher.execute(OptionParser(), argv)
File "/usr/local/git/depot_tools/subcommand.py", line 245, in execute
return command(parser, args[1:])
File "/usr/local/git/depot_tools/gclient.py", line 1631, in CMDconfig
client.SaveConfig()
File "/usr/local/git/depot_tools/gclient.py", line 1148, in SaveConfig
self.config_content)
File "/usr/local/git/depot_tools/gclient_utils.py", line 137, in FileWrite
with codecs.open(filename, mode=mode, encoding='utf-8') as f:
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/codecs.py", line 878, in open
file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 13] Permission denied: './.gclient'
Traceback (most recent call last):
File "/usr/local/git/depot_tools/fetch.py", line 302, in <module>
sys.exit(main())
File "/usr/local/git/depot_tools/fetch.py", line 298, in main
return run(options, spec, root)
File "/usr/local/git/depot_tools/fetch.py", line 292, in run
return checkout.init()
File "/usr/local/git/depot_tools/fetch.py", line 113, in init
self.run_gclient('config', '--spec', self.spec['gclient_spec'])
File "/usr/local/git/depot_tools/fetch.py", line 75, in run_gclient
return self.run(cmd_prefix + cmd, **kwargs)
File "/usr/local/git/depot_tools/fetch.py", line 65, in run
return subprocess.check_call(cmd, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('gclient', 'config', '--spec', "solutions = [{u'managed': False, u'name': u'src', u'url': u'https://chromium.googlesource.com/chromium/src.git', u'custom_deps': {}, u'deps_file': u'.DEPS.git', u'safesync_url': u''}]")' returned non-zero exit status 1
答案 0 :(得分:0)
运行$fetch chromium --nosvn=True
时cwd是什么?
从跟踪中看起来,您没有写入文件./.glcient
的写入权限。
答案 1 :(得分:0)
尝试在另一个目录中运行该脚本。因此,如果您键入ls并查看depot_tools文件夹,请运行脚本。