fix: error when legacy config exists#1001
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1001 +/- ##
==========================================
+ Coverage 74.34% 74.50% +0.16%
==========================================
Files 66 66
Lines 3461 3468 +7
==========================================
+ Hits 2573 2584 +11
+ Misses 688 684 -4
Partials 200 200 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| var osStat = os.Stat | ||
|
|
||
| func checkLegacyConfigFiles() error { | ||
| for _, file := range []string{"config.yml", "/etc/gotify/config.yml"} { |
There was a problem hiding this comment.
I don't think this is a great idea as it will make it impossible to start the server if there happens to be a config in /etc you are not authorized to delete.
Config.yml also could be for anything. I would say this should be a warning or warning unless no environment variable that start with GOTIFY_ exists.
There was a problem hiding this comment.
Fair. I wanted a way to prevent a user from just auto-updating, therefore the hard crash. But yeah, your right, I'll just close this PR.
No description provided.