Skip to content

When allow interpolation multiline first line of values are cutted #4

@nfalco79

Description

@nfalco79

I have a PyPI config file like this:

[distutils]
index-servers =
    pypi
    pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password

[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password

Now I would add a new server to the index:

Ini ini = new Ini();
ini.read(file);
ini.sections().get("distutils").put("index-servers", "test\npypi\npypitest")
ini.getSections().put("test", new HashMap<String, String>());
ini.write(file2);

the files will contains:

[distutils]
index-servers =
    pypi
    pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: your_username
password: your_password

[pypitest]
repository: https://testpypi.python.org/pypi
username: your_username
password: your_password

[test]

the new value of index-servers "test\npypi\npypitest" is replaced by interpolation with "\npypi\npypitest". The first row is removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions