[PR #3092] [MERGED] Optimize config loading messages #6856

Closed
opened 2026-03-07 21:06:53 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/3092
Author: @BlackDex
Created: 1/2/2023
Status: Merged
Merged: 1/9/2023
Merged by: @dani-garcia

Base: mainHead: optimize-config-loading-messages


📝 Commits (1)

  • 5964dc9 Optimize config loading messages

📊 Changes

1 file changed (+22 additions, -9 deletions)

View changed files

📝 src/config.rs (+22 -9)

📄 Description

As kinda discussed here #3090, the messages regarding loading the configuration files is a bit strange or unclear. There have been some other reports regarding this in the past, but wasn't that big a of a deal.

But to make the whole process it bit more nice, this PR adjusts the way it reports issues and some small changes to the messages to make it all a bit more clear.

  • Do not report a missing .env file, but only send a message when using one.
  • Exit instead of Panic, a panic causes a stacktrace, which isn't needed here. I'm using a exit code 255 here so it is different to the other exit's we use.
  • Exit on more issues, since if we continue, it could cause configuration issues if the user thinks all is fine.
  • Use the actual env file used in the messages instead of .env.
  • Added a INFO message when loading the config.json. This makes it consistent with the info message for loading the env file.

Resolves #3090


🔄 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/dani-garcia/vaultwarden/pull/3092 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 1/2/2023 **Status:** ✅ Merged **Merged:** 1/9/2023 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `optimize-config-loading-messages` --- ### 📝 Commits (1) - [`5964dc9`](https://github.com/dani-garcia/vaultwarden/commit/5964dc95f060678768608b4527afecc9d10c1b1e) Optimize config loading messages ### 📊 Changes **1 file changed** (+22 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/config.rs` (+22 -9) </details> ### 📄 Description As kinda discussed here #3090, the messages regarding loading the configuration files is a bit strange or unclear. There have been some other reports regarding this in the past, but wasn't that big a of a deal. But to make the whole process it bit more nice, this PR adjusts the way it reports issues and some small changes to the messages to make it all a bit more clear. - Do not report a missing `.env` file, but only send a message when using one. - Exit instead of Panic, a panic causes a stacktrace, which isn't needed here. I'm using a exit code 255 here so it is different to the other exit's we use. - Exit on more issues, since if we continue, it could cause configuration issues if the user thinks all is fine. - Use the actual env file used in the messages instead of `.env`. - Added a **INFO** message when loading the `config.json`. This makes it consistent with the info message for loading the env file. Resolves #3090 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-07 21:06:53 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#6856