File tree 2 files changed +2
-3
lines changed
2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ func EnsureDependencyOfArgs(pkg *models.Package, args []string) {
13
13
dependency := ParseDependency (args [e ])
14
14
dependency = strings .ToLower (dependency )
15
15
16
- re := regexp .MustCompile (`(?m) (?:(?P<host>.*)(?::(?P<version>[\^~]?(?:(?:(?:[0-9]+) (?:\.[0-9]+) (?:\.[0-9]+)?))))$|(?P<host_only>.*)) ` )
16
+ re := regexp .MustCompile (`(?U)(?m)^ (?:http[s]{0,1}://)? (?P<host>.*)(?::(?P<version>[\^~]?(?:\d+\.)? (?:\d+\.)? (?:\*|\d+)))?$ ` )
17
17
match := make (map [string ]string )
18
18
split := re .FindStringSubmatch (dependency )
19
19
@@ -24,12 +24,11 @@ func EnsureDependencyOfArgs(pkg *models.Package, args []string) {
24
24
}
25
25
var ver string
26
26
var dep string
27
+ dep = match ["host" ]
27
28
if len (match ["version" ]) == 0 {
28
29
ver = consts .MinimalDependencyVersion
29
- dep = match ["host_only" ]
30
30
} else {
31
31
ver = match ["version" ]
32
- dep = match ["host" ]
33
32
}
34
33
35
34
if strings .HasSuffix (strings .ToLower (dep ), ".git" ) {
You can’t perform that action at this time.
0 commit comments