Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion crates/uv-install-wheel/src/wheel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,12 @@ fn install_script(
let placeholder_python = b"#!python";
// scripts might be binaries, so we read an exact number of bytes instead of the first line as string
let mut start = vec![0; placeholder_python.len()];
script.read_exact(&mut start)?;
match script.read_exact(&mut start) {
Ok(()) => {}
// Ignore scripts shorter than the buffer.
Err(err) if err.kind() == io::ErrorKind::UnexpectedEof => {}
Err(err) => return Err(Error::Io(err)),
}
let size_and_encoded_hash = if start == placeholder_python {
let is_gui = {
let mut buf = vec![0; 1];
Expand Down
Loading