Closed david22swan closed 1 year ago
Can we get some sort of test on this logic please? 😄
There already is one that should have caught this. Not sure why it didn't
Test added/updated
Doing this at system level is a problem when running puppet as non-root, which I am doing in a container. Non-root users can't write to /etc/gitconfig. I will see if I can create that file in the containers /etc folder to be writable. - Update: I had to make /etc/ directory in the container writable by my non-root user, making the gitconfig file writable wasn't enough.
Due to mistake in the logic unsafe directory was previously removed on every other run. The logic previously checked whether the unsafe directory needed to be added, removing it if this was false without taking into account when it was already set but we wanted it to be left in place.
In addition: safe directory is now set at a system wide level rather than at a global user level in order to ensure it is as effective as possible.