Skip to content

Commit

Permalink
client/push: Disallow paths on the command line with --stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaofengli committed Oct 6, 2024
1 parent 014fb92 commit c54c26d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions client/src/command/push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit c54c26d

Please sign in to comment.