BetterErrors / better_errors

Better error page for Rack apps
MIT License
6.88k stars 437 forks source link

Ability to control editor URL using environment #381

Open RobinDaugherty opened 7 years ago

RobinDaugherty commented 7 years ago

Since the preference for editor varies by developer, not by project, it makes sense to allow the developer's environment to specify which editor better_errors links to.

Currently the EDITOR variable is supported, but this only matches specific, known editors that are hard-coded in better_errors.

I recommend a new environment variable, BETTER_ERRORS_EDITOR_URL, which would bypass inspection of EDITOR and override any configuration in the project. This would allow a developer to use their preferred editor without having to convince the rest of their team or modify better_errors.