Skip to content

Commit

Permalink
[ES-ARCHIVER] Fix bug when query flag is empty (elastic#77983)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnasikas committed Sep 22, 2020
1 parent b03c8bc commit 2481ae9
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 2481ae9

Please sign in to comment.