mirror of https://github.com/astral-sh/uv
Add dedicated warning for empty stdin (#9256)
## Summary I ran into this in practice: 
This commit is contained in:
parent
9fb7f81738
commit
f4799d2346
|
|
@ -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…
Reference in New Issue