Exception thrown when getUserHome() returns undefined.
As mentioned in #23
There's a issue with this line:
https://github.com/acrisci/node-dbus-next/blob/4283e0e535cf6ca519e8d839bc9216ec30b45830/lib/handshake.js#L21
On my set-up, getUserHome() returns undefined (this may be due to mine running in the Electron renderer process). This causes path.join to fail (this happens in the upstream repo as well).
I think we can lookup the home directory from /etc/passwd from the user indicated by process.getuid() when the HOME variable is not present.
https://github.com/sindresorhus/passwd-user
Ah ok I'm testing the handshake.js code and it's all very broken, but I do have a partial fix using that library.
I don’t think using /etc/passwd would work on macOS, so I don’t know who that fix would benefit. I’d say expected behaviour in this case would be to fall back to the next authentication method
Yeah it's the fallback that isn't implemented in the legacy code. Getting the home directory is only required for the sha1 authentication which I think is a Windows only feature and I'm not going to support Windows unless someone else wants to do it.