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:
parent
014fb92a9e
commit
c54c26d82e
1 changed files with 6 additions and 0 deletions
|
@ -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?;
|
||||
|
|
Loading…
Reference in a new issue