OpenSearch cannot start because of 'Duplicate field 'path.data'"

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearch Server

Describe the issue:
OpenSearch cannot start because of 'Duplicate field ‘path.data’"

Configuration:

The file /etc/opensearch/opensearch.yml contains TWO identical strings:

path.data: /var/lib/opensearch
path.data: /var/lib/opensearch

I didn’t edit this file so it looks like a BUG.

Relevant Logs or Screenshots:

It was my fault, but the duplicate entry should not cause a service to fail.
Issue a warning, don’t fail the service.

@nepenou As far as I’m aware any duplication in opensearch.yml will fail OpenSearch service to start.
With the warning, OpenSearch wouldn’t know which value of the duplicated option is correct.
Also troubleshooting of such scenario would be a nightmare.