Skip to content

Commit 6c9f56e

Browse files
committed
fix test on ubuntu arm64
1 parent e556e75 commit 6c9f56e

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/commands/install.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,20 +221,30 @@ fn test_compose_url_to_exec() {
221221
"https://dl.deno.land/release/v1.7.0/deno-x86_64-pc-windows-msvc.zip",
222222
"https://dl.deno.js.cn/release/v1.7.0/deno-x86_64-pc-windows-msvc.zip"
223223
);
224-
} else if #[cfg(target_os = "macos")] {
224+
} else if #[cfg(all(target_os = "macos", target_arch = "x86_64"))] {
225225
asserts_eq_one_of!(
226226
url.as_str(),
227227
"https://dl.deno.land/release/v1.7.0/deno-x86_64-apple-darwin.zip",
228228
"https://dl.deno.js.cn/release/v1.7.0/deno-x86_64-apple-darwin.zip",
229+
);
230+
} else if #[cfg(all(target_os = "macos", target_arch = "aarch64"))] {
231+
asserts_eq_one_of!(
232+
url.as_str(),
229233
"https://dl.deno.land/release/v1.7.0/deno-aarch64-apple-darwin.zip",
230234
"https://dl.deno.js.cn/release/v1.7.0/deno-aarch64-apple-darwin.zip"
231235
);
232-
} else if #[cfg(target_os = "linux")] {
236+
} else if #[cfg(all(target_os = "linux", target_arch = "x86_64"))] {
233237
asserts_eq_one_of!(
234238
url.as_str(),
235239
"https://dl.deno.land/release/v1.7.0/deno-x86_64-unknown-linux-gnu.zip",
236240
"https://dl.deno.js.cn/release/v1.7.0/deno-x86_64-unknown-linux-gnu.zip"
237241
);
242+
} else if #[cfg(all(target_os = "linux", target_arch = "aarch64"))] {
243+
asserts_eq_one_of!(
244+
url.as_str(),
245+
"https://dl.deno.land/release/v1.7.0/deno-aarch64-unknown-linux-gnu.zip",
246+
"https://dl.deno.js.cn/release/v1.7.0/deno-aarch64-unknown-linux-gnu.zip"
247+
);
238248
}
239249
}
240250
}

0 commit comments

Comments
 (0)