Skip to content

fix: error when legacy config exists#1001

Closed
jmattheis wants to merge 1 commit into
masterfrom
error-legacy-config
Closed

fix: error when legacy config exists#1001
jmattheis wants to merge 1 commit into
masterfrom
error-legacy-config

Conversation

@jmattheis

Copy link
Copy Markdown
Member

No description provided.

@jmattheis jmattheis requested a review from a team as a code owner July 15, 2026 18:03
@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.50%. Comparing base (9f7dc63) to head (f06f962).
⚠️ Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread config/file.go
var osStat = os.Stat

func checkLegacyConfigFiles() error {
for _, file := range []string{"config.yml", "/etc/gotify/config.yml"} {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jmattheis jmattheis closed this Jul 16, 2026
@jmattheis jmattheis deleted the error-legacy-config branch July 16, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants