1
0
Fork 0
mirror of https://github.com/zhaofengli/attic.git synced 2024-12-14 11:57:30 +00:00

client/push: Disallow paths on the command line with --stdin

This commit is contained in:
Zhaofeng Li 2024-10-06 12:29:03 -06:00
parent 014fb92a9e
commit c54c26d82e

View file

@ -182,6 +182,12 @@ pub async fn run(opts: Opts) -> Result<()> {
};
if sub.stdin {
if !sub.paths.is_empty() {
return Err(anyhow!(
"No paths can be specified on the command line with --stdin"
));
}
push_ctx.push_stdin().await?;
} else {
push_ctx.push_static(sub.paths.clone()).await?;