fix(compile): temporarily fallback to reading resource data from file on windows (#29024)

Temp hacky fix for https://github.com/denoland/deno/issues/28982
This commit is contained in:
David Sherret 2025-04-23 22:08:15 -04:00 committed by GitHub
parent 74425ddb0b
commit 3d16eb8ff3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 136 additions and 5 deletions

View file

@ -267,6 +267,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
// Phase 2 of the 'min sized' deno compile RFC talks
// about adding this as a flag.
if let Some(path) = get_dev_binary_path() {
log::debug!("Resolved denort: {}", path.to_string_lossy());
return std::fs::read(&path).with_context(|| {
format!("Could not find denort at '{}'", path.to_string_lossy())
});
@ -286,6 +287,7 @@ impl<'a> DenoCompileBinaryWriter<'a> {
let download_directory = self.deno_dir.dl_folder_path();
let binary_path = download_directory.join(&binary_path_suffix);
log::debug!("Resolved denort: {}", binary_path.display());
let read_file = |path: &Path| -> Result<Vec<u8>, AnyError> {
std::fs::read(path).with_context(|| format!("Reading {}", path.display()))