Closed spkane closed 5 years ago
I'm using the same code that discord's reference implementation uses:
That code simply doesn't work on Darwin/MacOS (at least anymore).
On macOS Mojave that code returns /tmp/discord-ipc-0
on my system.
On MacOS /tmp
is a link to /private/tmp
, but the IPC file is actually under /private/var
and is then still buried further down /private/var/folders/kh/388s01ns6r9480zhlk51nb200000gn/T/discord-ipc-0
.
@spkane it works fine for me and other people i've been talking to about this... are you sure your env isn't messed up?
Not exactly messed up, but I think I see what is happening, now that you posted that image.
In my .bashrc
, I very reasonably have set:
export TMPDIR="/tmp"
This impacts Visual Studio Code and the node code, as I want in general, but the issue is that the Discord Desktop does not get that environment, and writes things into the "default" user tmp dir.
Well, I will go ahead and pull that out for now since it is not vital, at the moment.
But, it still feels a bit like a bug somewhere, anyhow.
The IPC path on MacOS Mojave is here on my system:
I had to modify the
ipc.js
file to get this working.I'm assuming that this path is slightly different on people's systems, but a code fix for Darwin system to determine the correct path under
/private/var/folders
would be very helpful.I am not using this code directly, but it is a dependency for a plugin I use in my IDE.
Thanks!