@@ -121,6 +121,9 @@ impl OsArch {
121121 ( "linux" , "x86_64" ) => Ok ( "linux-64" ) ,
122122 ( "linux" , "aarch64" ) => Ok ( "linux-aarch64" ) ,
123123 ( "linux" , _) => Err ( DownloadError :: IncompatibleArch ) ,
124+ ( "macos" , "x86_64" ) => Ok ( "osx-64" ) ,
125+ ( "macos" , "aarch64" ) => Ok ( "osx-arm64" ) ,
126+ ( "macos" , _) => Err ( DownloadError :: IncompatibleArch ) ,
124127 _ => Err ( DownloadError :: IncompatibleOS ) ,
125128 }
126129 }
@@ -233,6 +236,8 @@ mod tests {
233236 ( "linux" , "aarch64" , "linux-aarch64" ) ,
234237 ( "linux" , "x86_64" , "linux-64" ) ,
235238 ( "windows" , "x86_64" , "win-64" ) ,
239+ ( "macos" , "aarch64" , "osx-arm64" ) ,
240+ ( "macos" , "x86_64" , "osx-64" ) ,
236241 ] ;
237242 for ( os, arch, expected) in green_path_cases {
238243 let os_arch = OsArch { os, arch } ;
@@ -248,6 +253,8 @@ mod tests {
248253 ( "linux" , "m68k" ) ,
249254 ( "windows" , "aarch64" ) ,
250255 ( "windows" , "arm" ) ,
256+ ( "macos" , "powerpc64" ) ,
257+ ( "macos" , "powerpc" ) ,
251258 ] ;
252259 for ( os, arch) in incompat_arch_cases {
253260 let os_arch = OsArch { os, arch } ;
0 commit comments