未验证 提交 d5a5f2f2 编写于 作者: J Jabasukuriputo Wang 提交者: GitHub

Strip whitespaces from URL and dirname prior to extension installation

This avoid some cryptic errors brought by accidental spaces around urls
上级 baf6946e
......@@ -325,6 +325,11 @@ def normalize_git_url(url):
def install_extension_from_url(dirname, url, branch_name=None):
check_access()
if isinstance(dirname, str):
dirname = dirname.strip()
if isinstance(url, str):
url = url.strip()
assert url, 'No URL specified'
if dirname is None or dirname == "":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册