nikola
nikola copied to clipboard
"nikola serve": Better error message when the port is already in use.
Requested Feature: (short description)
A better error message when the port is already in use, for example, when you start a second nikola serve instance.
Related Area: (eg. tasks, compilers, configuration, templates…)
command line interface
Do you want to contribute this yourself as a pull request? (don’t worry about it if you don’t want to/can’t — someone else can take care of it)
- [x] Yes, I have already written code for it (link if available and feasible)
- [ ] Yes, I don’t have code ready yet (that’s okay!)
- [ ] No (that’s okay too!)
Does this feature affect backwards compatibility? If yes, in what way?
No
Rationale and full description: (why should it be added to Nikola?)
Tell the user what the problem is and how to solve it (-p option). Alternatively nikola could also just try to find an open port (e.g. try 8001, 8002, etc)
Alternatively nikola could also just try to find an open port (e.g. try 8001, 8002, etc)
I would avoid automatically picking something (except when the user explicitly tells Nikola to do that). Opening unexpected ports is often not a good idea.
(But improving the error message is definitely a good idea!)