feat: Add warning when installing without running server #825
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #369 #511 #533 #798 (comment), installing HRMS is not possible if the server is not running, contrary to the other apps. This might (and actually does) lead to confusion, because the error message can be difficult to parse.
Because this issue will probably not be “fixed” soon (see: last 3 comments here #369 (comment)), I believe it's better to show a clear error message.
Detecting whether the server is running is done using the following code taken from
frappe/migrate.py
:https://github.com/frappe/frappe/blob/173605fe2c16f8bed2710a6c3e9d6d064cf152de/frappe/migrate.py#L150-L156
Warning
I did not check whether my change breaks things like Frappe Docker, I only checked the manual CLI install.