deno
32a14474 - fix(desktop): correct libdenort unpack path with non-executable extension (#35267)

Commit
84 days ago
fix(desktop): correct libdenort unpack path with non-executable extension (#35267) ## Summary `deno desktop` panics while unpacking the base runtime: ``` thread 'main' panicked at cli/util/archive.rs:116:3: assertion failed: exe_path.exists() ``` `archive::unpack_into_dir` reconstructed the expected output file name from `exe_name` + `is_windows`, appending an *executable* extension (`""` on unix, `"exe"` on windows). The `deno desktop` path passes `libdenort.dylib`, so `dest.join("libdenort.dylib").with_extension("")` **strips** the `.dylib` and the function looks for a file named `libdenort` that never exists — even though the zip crate extracts `libdenort.dylib` correctly. That false negative triggers the shell `unzip` fallback (which prompts interactively for overwrite, hanging on non-TTY) and finally panics on `assert!(exe_path.exists())`. ## Fix `UnpackArgs.exe_name` is now the **full** expected file name; the `is_windows`/extension-reconstruction logic is removed. Callers pass the complete name, matching the actual archive contents on every platform: | archive | contains | `exe_name` | |---|---|---| | `deno-*-darwin.zip` | `deno` | `deno` | | `deno-*-windows.zip` | `deno.exe` | `deno.exe` | | `denort-*-windows.zip` | `denort.exe` | `denort.exe` | | `libdenort-*-darwin.zip` | `libdenort.dylib` | `libdenort.dylib` | The `deno`/`denort` paths are behavior-preserving (the old `with_extension("")`/`("exe")` round-tripped to the same names); only the dylib case is fixed. The fix also avoids the interactive `unzip` fallback entirely, since the zip crate now produces the expected path on the first try.
Author
Parents
Loading