2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-17 02:25:16 +00:00

fix: Allow git url with custom username (#1200)

Allow git url with custom user, and not just the git user.
This commit is contained in:
kevgeni 2021-09-17 05:59:14 -04:00 committed by GitHub
parent 9b2b105b65
commit 641181260e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ def write_appstxt(apps, bench_path='.'):
def is_git_url(url): def is_git_url(url):
# modified to allow without the tailing .git from https://github.com/jonschlinkert/is-git-url.git # modified to allow without the tailing .git from https://github.com/jonschlinkert/is-git-url.git
pattern = r"(?:git|ssh|https?|git@[-\w.]+):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$" pattern = r"(?:git|ssh|https?|\w*@[-\w.]+):(\/\/)?(.*?)(\.git)?(\/?|\#[-\d\w._]+?)$"
return bool(re.match(pattern, url)) return bool(re.match(pattern, url))
def get_excluded_apps(bench_path='.'): def get_excluded_apps(bench_path='.'):