fix(hotpatch): Gracefully handle missing '-flavor' flag during WASM link (#4833)

* fix(hotpatch): Gracefully handle missing '-flavor' flag during WASM link

* drops logs

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
luckybelcikandJonathan Kelley authored and GitHub committed 2025-10-27 09:58:28 -07:00
1 parent 047e518edf
commit 3eecfaa0a7
1 file changed
+1 -2
+1 -2
View File
@@ -2254,8 +2254,7 @@ impl BuildRequest {
}
// We want to go through wasm-ld directly, so we need to remove the -flavor flag
if self.is_wasm_or_wasi() {
let flavor_idx = args.iter().position(|arg| *arg == "-flavor").unwrap();
if let Some(flavor_idx) = args.iter().position(|arg| *arg == "-flavor") {
args.remove(flavor_idx + 1);
args.remove(flavor_idx);
}