If you're on macOS and suddenly composer has started throwing this weird error and you're wondering where the problem is, well, here's the solution and how to debug.
Error when you run composer global update
or any other similar commands.
In Process.php line 441: