-
Notifications
You must be signed in to change notification settings - Fork 47
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
Follow Debian guidelines for launching editors #157
Conversation
Thanks for implementing this, tested and works. |
I missed that issue, and VISUAL. So I've included that as well (and squashed the commits while I was at it). It's not strictly correct though, as it doesn't check if VISUAL or EDITOR points to an executable file. But I figure if someone sets EDITOR they probably know what they are doing 😄 |
thanks @maxnordlund, obviously, still works - just tested it. Just a reminder that |
If we want to be really complete then we need to check if the command exists too. I think a This has the added benefit of making this bit redundant: Lines 1509 to 1514 in 4867555
|
OK, so I took the time to do this properly. It now closely follows the Debian guidelines, including both looking up |
When jailmaker wants to ask the user to edit a file, mostly a jail config, it currently uses `nano`. This is not how a program is supposed to work according to [Debian's guidelines]. This changes the hardcoded `nano` to look up the correct editor to use using environmental variables. [1]: https://www.debian.org/doc/debian-policy/ch-customized-programs.html#editors-and-pagers
This is how most other tools work when they want the user to edit a file.