[PR #865] [MERGED] fix: override configuration from flags only if set #829

Closed
opened 2026-02-25 23:35:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/865
Author: @fmartingr
Created: 3/23/2024
Status: Merged
Merged: 3/30/2024
Merged by: @fmartingr

Base: masterHead: fix/env-override-server


📝 Commits (6)

  • 397b772 fix: override configuration from flags only if set
  • 89f3a92 Merge branch 'master' into fix/env-override-server
  • 3b54cfd Merge branch 'master' into fix/env-override-server
  • d0e394e use helper func and test it
  • b257fcb Merge remote-tracking branch 'origin/fix/env-override-server' into fix/env-override-server
  • 3a929c6 Merge branch 'master' into fix/env-override-server

📊 Changes

2 files changed (+99 additions, -7 deletions)

View changed files

📝 internal/cmd/server.go (+27 -7)
internal/cmd/server_test.go (+72 -0)

📄 Description

This pull request checks if the flags provided to the server command has been set (are changed from the default values) before overriding the configuration with their values.

This fixes the configuration not being able to work when using only environment variables, since the default values were always overriden by the flags, regardless of being set up or not.

Ping @tenpai-git

Closes #844


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/865 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 3/23/2024 **Status:** ✅ Merged **Merged:** 3/30/2024 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `fix/env-override-server` --- ### 📝 Commits (6) - [`397b772`](https://github.com/go-shiori/shiori/commit/397b772569d5068942d45783e096b62bbfe3e41b) fix: override configuration from flags only if set - [`89f3a92`](https://github.com/go-shiori/shiori/commit/89f3a92a49e6da6245149d5174a5993fd98780c7) Merge branch 'master' into fix/env-override-server - [`3b54cfd`](https://github.com/go-shiori/shiori/commit/3b54cfd674ae49145b628979947d41f8008668ee) Merge branch 'master' into fix/env-override-server - [`d0e394e`](https://github.com/go-shiori/shiori/commit/d0e394e22f12ff577e53f57112e376e7cededaf4) use helper func and test it - [`b257fcb`](https://github.com/go-shiori/shiori/commit/b257fcbda523823ba6dbf025f2cc4a69d95bc492) Merge remote-tracking branch 'origin/fix/env-override-server' into fix/env-override-server - [`3a929c6`](https://github.com/go-shiori/shiori/commit/3a929c6c2a4be94ec42cca839b6d060ebd733719) Merge branch 'master' into fix/env-override-server ### 📊 Changes **2 files changed** (+99 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `internal/cmd/server.go` (+27 -7) ➕ `internal/cmd/server_test.go` (+72 -0) </details> ### 📄 Description This pull request checks if the flags provided to the `server` command has been set (are changed from the default values) before overriding the configuration with their values. This fixes the configuration not being able to work when using only environment variables, since the default values were always overriden by the flags, regardless of being set up or not. Ping @tenpai-git Closes #844 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:35:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#829
No description provided.