Describe the Bug
In Puppet OpenStack project we use the Puppet::Util::IniFile utility class to manipulate ini settings.
We recently discovered that its set_value method uses nil (which is translated to '') as the default separator unless separator is explicitly passed.
This is inconsistent with the other logic (eg loading options from config file) and is confusing.
Expected Behavior
The set_value method honors the key_value_separator unless separator is explicitly defined
Steps to Reproduce
Steps to reproduce the behavior:
- Run the following code snippet
config = Puppet::Util::IniFile.new('./test.conf')
config.set_value('foo', 'bar', 'baz')
Current implementation results in dumping
into the test.conf file.
Environment
- Version: 6.1.1
- Platform: CentOS Stream 9
Additional Context
N/A
Describe the Bug
In Puppet OpenStack project we use the
Puppet::Util::IniFileutility class to manipulate ini settings.We recently discovered that its
set_valuemethod usesnil(which is translated to'') as the default separator unless separator is explicitly passed.This is inconsistent with the other logic (eg loading options from config file) and is confusing.
Expected Behavior
The set_value method honors the key_value_separator unless separator is explicitly defined
Steps to Reproduce
Steps to reproduce the behavior:
Current implementation results in dumping
into the
test.conffile.Environment
Additional Context
N/A