From a2d09757fdf9e3dff0e96d4d5b2cf18403260512 Mon Sep 17 00:00:00 2001 From: Christos Nasikas Date: Tue, 22 Sep 2020 17:10:32 +0300 Subject: [PATCH] [7.x] [ES-ARCHIVER] Fix bug when query flag is empty (#77983) (#78133) --- 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) {