File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ jobs:
118118 - run : pkgx -qq git --version
119119 - run : pkgx -s git --version
120120 - run : pkgx -j +git
121+ - run : pkgx git\* --version # test star constraints are valid
121122 - run : pkgx /usr/bin/awk --version
122123 - run : pkgx +yarnpkg.com yarn --version
123124 - run : pkgx +yarnpkg.com -- yarn --version
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::fmt;
88
99//TODO regex is probs not most efficient (but do perf tests if you change it)
1010lazy_static ! {
11- static ref PACKAGE_REGEX : Regex = Regex :: new( r"^(.+?)([\^=~<>@].+)?$" ) . unwrap( ) ;
11+ static ref PACKAGE_REGEX : Regex = Regex :: new( r"^(.+?)(( [\^=~<>@].+)|\* )?$" ) . unwrap( ) ;
1212}
1313
1414#[ derive( Debug , Clone , serde:: Serialize ) ]
@@ -40,7 +40,12 @@ impl PackageReq {
4040
4141 let project = captures. get ( 1 ) . unwrap ( ) . as_str ( ) . to_string ( ) ;
4242 let str = if let Some ( cap) = captures. get ( 2 ) {
43- cap. as_str ( )
43+ let cap = cap. as_str ( ) ;
44+ if cap. trim ( ) == "" {
45+ "*"
46+ } else {
47+ cap
48+ }
4449 } else {
4550 "*"
4651 } ;
You can’t perform that action at this time.
0 commit comments