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,11 +220,15 @@ impl RequirementsTxt {
|
||||||
error: err,
|
error: err,
|
||||||
})?;
|
})?;
|
||||||
if data == Self::default() {
|
if data == Self::default() {
|
||||||
|
if requirements_txt == Path::new("-") {
|
||||||
|
warn_user!("No dependencies found in stdin");
|
||||||
|
} else {
|
||||||
warn_user!(
|
warn_user!(
|
||||||
"Requirements file {} does not contain any dependencies",
|
"Requirements file {} does not contain any dependencies",
|
||||||
requirements_txt.user_display()
|
requirements_txt.user_display()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Ok(data)
|
Ok(data)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue