-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
not all user environment variables are bypassed into $EDITOR #742
Comments
you can get back to that behavior with this config option: https://github.com/actionless/pikaur#privilegeescalationtarget-default-pikaur but actually while we were discussing that new preserve-env thing with another user - it came up in conversation, that it might make sense in the future to make preserve-env list configurable via pikaur.conf |
actually i just hit that problem myself trying to build |
Thanks for reporting! |
The new version At the root of the issue is this:
Passing I'd suggest also passing Those of us who use |
@veox yeah you that would be weird to bypass as a workaround try changing here https://github.com/actionless/pikaur?tab=readme-ov-file#privilegeescalationtarget-default-pikaur to pacman (it would change sudo logic a bit) |
[Optional] Prerequisites:
Have this in the environment:
Description:
pikaur can't open the emacs (client) anymore. (I run emacs as daemon, and then you can use use
emacsclient
to open a new editor view. I think this regression is caused by 075e7eb:The log shows:
Indeed,
sudo --user=<myuser> --preserve-env=XDG_RUNTIME_DIR emacsclient test
works whereassudo --user=<myuser> emacsclient test
does not work. I think one solution is toXDG_RUNTIME_DIR
toPRESERVE_ENV
but I'm not convinced that this is the proper way. Other users/editors will likely need other variables. I think a proper solution is to run the editor in the initial environment and with the initial permissions (before elevating permissions), instead of elevating and dropping again.A workaround for me is
VISUAL="env XDG_RUNTIME_DIR=/run/user/1000 emacsclient --tty"
.The text was updated successfully, but these errors were encountered: