mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Add dedicated warning for empty stdin (#9256)
## Summary I ran into this in practice: 
This commit is contained in:
parent
9fb7f81738
commit
f4799d2346
1 changed files with 8 additions and 4 deletions
|
@ -220,10 +220,14 @@ impl RequirementsTxt {
|
|||
error: err,
|
||||
})?;
|
||||
if data == Self::default() {
|
||||
warn_user!(
|
||||
"Requirements file {} does not contain any dependencies",
|
||||
requirements_txt.user_display()
|
||||
);
|
||||
if requirements_txt == Path::new("-") {
|
||||
warn_user!("No dependencies found in stdin");
|
||||
} else {
|
||||
warn_user!(
|
||||
"Requirements file {} does not contain any dependencies",
|
||||
requirements_txt.user_display()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue