Skip to content

Adding value to nested dicts broken after 2.2.0 #2009

@jensens

Description

@jensens

Tested with cookiecutter version: 2.5.0 and main

Prior to Version 2.2.0 one could have a cookiecutter.json with a dict as value like so:

{
  "mainkey": {
    "subkey1": "value1"
    "subkey2": "value2"
   }
}

and then define an YAML to pass in with --config-file like so:

default_context:
    mainkey:
        subkey1: value1
        subkey2: value2
        subkey3: value3
        subkey4: value4

And after this, in the template with cookiecutter.mainkey one got all subkey1 to subkey4.

The feature #1692 here broke this (even if there were already some other fixes to this).

After 2.2.0 all we got are subkey1 and subkey2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    regressionA feature used to work in past and is now broken or gone.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions