Sadly puppet has similar logic in a bunch of places: https://github.com/puppetlabs/puppet/blob/master/lib/puppet/settings.rb#L50-L59