node-machine-id
node-machine-id copied to clipboard
Specify the full path to ioreg rather than relying on PATH being correct
What
Specify the full path to the ioreg command on macOS so node-machine-id works properly regardless of the $PATH it's being run with.
Why
I just spent a few days chasing down a problem with the homebridge-ring project that ultimately was caused by the fact that I was running without /usr/sbin in my $PATH.
I fixed my problem by fixing my path, but it seems prudent to make this change to avoid problems for anyone else who happens to accidentally have a wonky environment.
Risks
Low; ioreg is part of Apple's I/O Kit and seems unlikely to move around in the future.