MacOS has its oddities though. Some of its coreutils aren’t quite BSD but they’re not quite GNU either, so sometimes scripts have to either special-case MacOS or ensure they use options that only work across GNU, BSD and MacOS. This is an example of one I had to fix a few years back: https://github.com/yarnpkg/yarn/issues/1984
MacOS has its oddities though. Some of its coreutils aren’t quite BSD but they’re not quite GNU either, so sometimes scripts have to either special-case MacOS or ensure they use options that only work across GNU, BSD and MacOS. This is an example of one I had to fix a few years back: https://github.com/yarnpkg/yarn/issues/1984