Closed NotPhantomX closed 1 year ago
Cannot reproduce on Arch
Just reproduced on arch, I cannot plug due to this issue.
Here is my neofetch:
bumping because i still cannot plug my client.
I'd love to see this fixed, haven't been able to use my plugins or theme in 3 days.
Instead of waiting for three days, just make the folder yourself until we fix it...?
uh, you seem to be missing the bigger issue here. when i build & install my plugins & themes they go in MY ${USER}/.config
and I presume when I run Discord as my user, it's not going to read out of the /root/.config
. Or, if it does, it's going to run into permission problems when it tries to load plugins. Or maybe it'd work if I ran Discord as root but to hell with that.
Oh, an update on this: I got a chance to properly test your "fix" yesterday on my day off. I ended up in a perpetual loading state for hours. I let it sit and chug.
A temporary fix is to add the absolute path to src/util.ts this function is at the top of the file just replace it with the below and modify the string to be the absolute path to your .config folder
export const configPathFn = (): string => {
switch (process.platform) {
case "win32":
return join(process.env.APPDATA || "", REPLUGGED_FOLDER_NAME);
case "darwin":
return join(process.env.HOME || "", "Library", "Application Support", REPLUGGED_FOLDER_NAME);
default:
return join("/home/your user directory/.config/", REPLUGGED_FOLDER_NAME);
// if (process.env.XDG_CONFIG_HOME) {
// return join(process.env.XDG_CONFIG_HOME!, REPLUGGED_FOLDER_NAME);
// }
// return join(process.env.HOME || "", ".config", REPLUGGED_FOLDER_NAME);
}
};
Thanks, I'll give it a shot when I get home.
@NotPhantomX I linked #408 which should fix this issue. Feel free to try on that branch to see if it works for you. If not, let me know.
@NotPhantomX I linked #408 which should fix this issue. Feel free to try on that branch to see if it works for you. If not, let me know.
I have confirmed that that branch successfully finds the right .config directory and successfully injects.
Great! Will merge it now.
Pog, thanks y'all :)
Describe the bug
In src/util.ts configPathFn returns /root/.config/replugged instead of /home/{username}/.config/replugged causing an error since the .config folder in /root/ does not exist. The cause seems to be process.env.XDG_CONFIG_HOME being set to /root at some point. Using bash instead of zsh or fish sets process.env.HOME to /root as well.
Reproduction steps
Expected behavior
expected replugged to succeed in plugging discord
Actual behavior
tries to create /root/.config/replugged and fails to create the path since /root/.config also does not exist.
Additional information
Operating System: Fedora 37 Discord Version: Canary 173897 (8aa1dde)
Please confirm the following