tox.ini 是否需要对 URL 中的锚点(哈希#)进行转义?

2024-02-14

我有一个像这样的tox.ini

[tox]
skipsdist = True
envlist = begin,py35,py36,end

[testenv]
commands =
    pip install -e git+ssh://[email protected] /cdn-cgi/l/email-protection/org/repo#egg=repo[server]

我得到了错误

无法检测“git+ssh://”的需求名称[电子邮件受保护] /cdn-cgi/l/email-protection/org/repo.git',请使用 #egg=your_package_name 指定一个

看起来很像#被视为评论。是这样吗?我怎样才能逃脱它?

我尝试过的

  • \#: \ 被识别,但其余部分不被识别 - 所以它不是转义字符
  • 引用整个字符串:ERROR: InvocationError: could not find executable 'pip install -e git+ssh://[email protected] /cdn-cgi/l/email-protection/org/repo.git#egg=repo[server]'

我的猜测是尝试引用 URL:



[testenv]
commands =
    pip install -e "git+ssh://[email protected] /cdn-cgi/l/email-protection/org/repo#egg=repo[server]"
  

这似乎可以解决问题。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

tox.ini 是否需要对 URL 中的锚点(哈希#)进行转义? 的相关文章

随机推荐