pixelb / crudini

A utility for manipulating ini files
GNU General Public License v2.0
443 stars 63 forks source link

Parameter not added in the correct location when "include" directives are involved #66

Open DeLoWaN opened 4 years ago

DeLoWaN commented 4 years ago

I'm trying to manipulate php-fpm config files.

On php-fpm.conf, you have a [global] section, and at the end an include=/etc/php/7.0/fpm/pool.d/*.conf.

These additionnal config files contains others section definition.

Problem is, when you want to add a non-already-existing parameter, its get added at the end of the section, namely after the include directive. In the end, this cause the parameter to be added in another section of the config file.

I think this could be easily resolved by adding new parameters right after the the section name, what do you think ?

pixelb commented 4 years ago

Generally one would want to add new parameters to the end of a section. We'd have to figure some way to make it an option