Open kaykayehnn opened 3 years ago
I encountered a crash when running live-server from a systemd service, and tracked the issue to loading the config from a user's home folder
https://github.com/tapio/live-server/blob/01cd7f970439d42537bbe13b4885befb816a0446/live-server.js#L17-L23
In systemd services, the HOME variable is not present, which causes the issue.
This PR fixes it by verifying the variable is non-empty before loading a user's config.
Hi @kaykayehnn I would like to use your PR for dead-server update, because this project seems to be abandoned.
dead-server
I encountered a crash when running live-server from a systemd service, and tracked the issue to loading the config from a user's home folder
https://github.com/tapio/live-server/blob/01cd7f970439d42537bbe13b4885befb816a0446/live-server.js#L17-L23
In systemd services, the HOME variable is not present, which causes the issue.
This PR fixes it by verifying the variable is non-empty before loading a user's config.