Skip to content

Commit

Permalink
[ES-ARCHIVER] Fix bug when query flag is empty (#77983)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas authored Sep 22, 2020
1 parent 4dc0c12 commit 13bd34e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/kbn-es-archiver/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export function runCli() {

const query = flags.query;
let parsedQuery;
if (typeof query === 'string') {
if (typeof query === 'string' && query.length > 0) {
try {
parsedQuery = JSON.parse(query);
} catch (err) {
Expand Down

0 comments on commit 13bd34e

Please sign in to comment.