From 13bd34e2da9da1178d88868f18c22a215d4d73ec Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Tue, 22 Sep 2020 10:12:24 +0300 Subject: [PATCH] [ES-ARCHIVER] Fix bug when query flag is empty (#77983) --- packages/kbn-es-archiver/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kbn-es-archiver/src/cli.ts b/packages/kbn-es-archiver/src/cli.ts index 41abe83c148cd..87df07fe865bd 100644 --- a/packages/kbn-es-archiver/src/cli.ts +++ b/packages/kbn-es-archiver/src/cli.ts @@ -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) {