File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -144,9 +144,8 @@ impl FoojayDiscoApi {
144144 . forced_os
145145 . clone ( )
146146 . unwrap_or_else ( || detected_foojay_os ( & libc) . to_string ( ) ) ;
147- let url = Url :: parse_with_params (
148- & format ! ( "{}/packages" , FOOJAY_BASE_URL ) ,
149- & [
147+ let url = {
148+ let mut params = vec ! [
150149 // We don't want to handle JREs yet.
151150 ( "package_type" , "jdk" . to_string( ) ) ,
152151 // JavaFX can be nice to have bundled.
@@ -163,12 +162,15 @@ impl FoojayDiscoApi {
163162 } ,
164163 ) ,
165164 ( "distribution" , distribution. to_string( ) ) ,
166- ( "operating_system" , os) ,
165+ ( "operating_system" , os. clone ( ) ) ,
167166 ( "architecture" , arch) ,
168- ( "libc_type" , libc. clone ( ) ) ,
169- ] ,
170- )
171- . unwrap ( ) ;
167+ ] ;
168+ if os == "linux" || os == "linux-musl" {
169+ params. push ( ( "libc_type" , libc. clone ( ) ) ) ;
170+ }
171+
172+ Url :: parse_with_params ( & format ! ( "{}/packages" , FOOJAY_BASE_URL ) , & params) . unwrap ( )
173+ } ;
172174 self . call_foojay_api :: < FoojayPackageListInfo > ( url) ?
173175 . into_iter ( )
174176 . find_map ( |p| -> Option < ESResult < _ , FoojayDiscoApiError > > {
You can’t perform that action at this time.
0 commit comments