From 4f28fd513436107fd793e81ff70fae64b710d3ab Mon Sep 17 00:00:00 2001 From: Robert-André Mauchin Date: Apr 01 2019 11:29:54 +0000 Subject: Add check for all supprted goipath Signed-off-by: Robert-André Mauchin --- diff --git a/go2rpm/__main__.py b/go2rpm/__main__.py index 36a1270..e988a13 100644 --- a/go2rpm/__main__.py +++ b/go2rpm/__main__.py @@ -296,8 +296,8 @@ def main(): goipath = re.sub("^http(s?)://", "", args.goipath) goipath = goipath.strip('/') - if not 'github.com' in args.goipath and args.forge is None: - parser.error("forge URL is required for non-github import path") + if not re.search("^(github.com|gitlab.com|bitbucket.org)", args.goipath) and args.forge is None: + parser.error("forge URL is required for import path other than github, gitlab and bitbucket") if args.forge is None: forge = 'https://' + goipath