hercules-ci-agent icon indicating copy to clipboard operation
hercules-ci-agent copied to clipboard

`hci secret` ignores empty JSON objects

Open roberth opened this issue 3 years ago • 1 comments

Description

The JSON merging algorithm I wrote is stupid. Should have been a [Value] -> Value merge instead of a merge of (path, value) association list.

To Reproduce

hci secret echo --json foo 'true' --json bar {}
{
  "kind": "Secret",
  "data": {
    "foo": true
  }
}

bar is missing.

Expected behavior

hci secret echo --json foo 'true' --json bar {}
{
  "kind": "Secret",
  "data": {
    "foo": true,
    "bar": {}
  }
}

Platform / Version

hci 0.2.4

roberth avatar Feb 02 '22 13:02 roberth

Hey @roberth I have fixed this and raised a PR for this. Please review my PR. Thanks!

NaincyKumariKnoldus avatar Feb 02 '22 13:02 NaincyKumariKnoldus