netblue30 / firejail

Linux namespaces and seccomp-bpf sandbox
https://firejail.wordpress.com
GNU General Public License v2.0
5.83k stars 568 forks source link

build: sort.py: add and require -i to edit in-place #6290

Closed kmk3 closed 8 months ago

kmk3 commented 8 months ago

Similarly to sed -i and perl -i.

This allows checking if sort.py correctly sorts the relevant lines in a profile without having to overwrite it, which makes debugging and testing easier (for example, in #6261).

Note: If it finds items that are not sorted, it still sorts them, prints the diff and returns an error.