Skip to content

The _substituteVars function throws an illegal key type for substitution map if it encounters and array while mapping the variables in custom-environment-variables.json #472

@vchouhan

Description

@vchouhan

What is the current behavior?

The _substituteVars function throws an illegal key type for substitution map if it encounters and array while mapping the variables in the custom-environment-variables.json
*Create custom-environment-variables.json file and add a properties to pull values from env file:

"services": {
"messagehub": [
{
"label": "messagehub",
"credentials": {
"api_key": "API_KEY", // from env
"kafka_rest_url": "REST_URL" // from env
}
}
]
}
`
screen shot 2018-02-21 at 07 58 13

What is the expected behavior?

The _substituteVars function in config.js throws an error. Illegal key type for substitution map at components.services: object as the function is only validating 'strings' and 'objects' and since I've an

Please tell us about your environment:

  • node-config version: 1.29.4
  • node-version: 9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions