[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sudo error on macOS #68

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Fix sudo error on macOS #68

merged 1 commit into from
Jun 27, 2022

Conversation

coryshaw1
Copy link
Contributor

When using sudo a separate environment is used unless specifying sudo -E. This fixes the error of path being nil when using neovim in sudo

When using sudo a separate environment is used unless specifying sudo -E. This fixes the error of path being nil when using neovim in sudo
@andweeb
Copy link
Owner
andweeb commented Jun 27, 2022

Hi @coryshaw1, sorry for the late response! That's a good catch, sudo (env_reset) was definitely an oversight. Apologies for the errors! In macOS, the plugin requires (and assumes) the $TMPDIR environment variable to be preserved, as it's used to determine the path of the Discord IPC socket.

Just as a general note, rather than running sudo nvim or sudo -E nvim, I'd recommend setting your $EDITOR (or $VISUAL) environment variable to nvim and instead use sudo -e to avoid exposing your system to any potential bugs or vulnerabilities involving Neovim. It essentially enables you to edit a temporary copy before it is moved to the original file, which circumvents the default env_reset behavior and allows this plugin to function correctly.

In any case, your changes LGTM so I'll merge em in. Thanks for the PR!

@andweeb andweeb merged commit 660bd88 into andweeb:main Jun 27, 2022
jiriks74 added a commit to jiriks74/presence.nvim that referenced this pull request Apr 8, 2024
jiriks74 added a commit to jiriks74/presence.nvim that referenced this pull request Apr 8, 2024
* fix(ci/cd): Move StyLua from action to cargo + command
[andweeb#68] StyLUA check is not working for PRs from forks

https://openproject.stefka.eu/work_packages/68

* fix(formatting): fix bad formatting from #39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants