Skip to content

Commit 6620fcd

Browse files
dokmicviduni94
authored andcommitted
Fix telemetry CLI to write empty properties collection (elastic#205746)
Follow-up of elastic#205613. Remove check blocking empty properties from writing.
1 parent 32b19c2 commit 6620fcd

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

packages/kbn-telemetry-tools/src/tools/tasks/write_to_file_task.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function writeToFileTask({ roots }: TaskContext) {
1515
return roots.map((root) => ({
1616
task: async () => {
1717
const fullPath = path.resolve(process.cwd(), root.config.output);
18-
if (root.mapping && Object.keys(root.mapping.properties).length > 0) {
18+
if (root.mapping) {
1919
// Sort first-level properties alphabetically
2020
root.mapping.properties = Object.fromEntries(
2121
Object.entries(root.mapping.properties).sort(([a], [b]) => {
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"properties": {
3-
}
2+
"properties": {}
43
}

0 commit comments

Comments
 (0)