

To add to the last comment, I’d also suggest not mixing logging and business code.
That is to say that you should put the system call on its own line, so that it is clear that it’s not just a logging call:
if (!strcmp(platform, "windows") && !isSpecificPlatform) {
debugLog("Falling back to rm -rf", 2);
int result = system(strfmt("rm -rf %s", path));
debugLog(strfmt("rm -rf exited with code %d", result), 3);
}
It may just be a me problem, but I have a tendency to skim over the logging lines unless I’m intentionally reading code carefully, in which case the system call may get overlooked



Always take these stories with a grain of salt.
For example, while the article claims that “we saw Denmark’s government move from Windows to Linux back in 2025”, the reality is that it was just one department and they didn’t even move to Linux. They merely started a pilot project to see if they could move from Office 365 to Collabora: https://www.digmin.dk/digitalisering/nyheder/nyhedsarkiv/2025/jun/digitaliseringsministeriet-saetter-gang-i-pilotprojekt-om-digital-suveraenitet