Skip to content

Commit

Permalink
feat: check the batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuruyia committed Jan 3, 2024
1 parent f3126d8 commit 0c64151
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/commands/paas/elasticsearch/dump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class PaasEsDump extends PaasKommand {
];

async runSafe() {
// Check that the batch size is positive
if (this.flags["batch-size"] <= 0) {
this.logKo(`The batch size must be greater than zero. (Specified batch size: ${this.flags["batch-size"]})`);
process.exit(1);
}

// Log in to the PaaS
const apiKey = await this.getCredentials();

Expand Down

0 comments on commit 0c64151

Please sign in to comment.