[PR #5055] [MERGED] Fix --version from failing without config #7193

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

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/5055
Author: @BlackDex
Created: 10/6/2024
Status: Merged
Merged: 10/11/2024
Merged by: @dani-garcia

Base: mainHead: fix-version-info-issue


📝 Commits (2)

  • ad70e59 Fix --version from failing without config
  • 115ccb8 Adjusted the code bsaed upon review

📊 Changes

3 files changed (+12 additions, -4 deletions)

View changed files

📝 src/config.rs (+9 -2)
📝 src/db/models/emergency_access.rs (+1 -1)
📝 src/main.rs (+2 -1)

📄 Description

Since we added the option to show the web-vault version also when running --version this causes the config to always be validated. While this is not very bad in general, it could cause the command to quit during the config validation, and not show the version, but also errors. This is probably not very useful for this specific command, unlike the --backup for example.

To fix this, and preventing the config from being validated, i added an AtomicBool to check if we need to validate the config on first load. This prevents errors, and will just show the Vaultwarden version, and if possible the web-vault version too.

Fixes #5046


🔄 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/5055 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/6/2024 **Status:** ✅ Merged **Merged:** 10/11/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-version-info-issue` --- ### 📝 Commits (2) - [`ad70e59`](https://github.com/dani-garcia/vaultwarden/commit/ad70e59777d6995b9c6fb92ea560896d7f6a2be1) Fix `--version` from failing without config - [`115ccb8`](https://github.com/dani-garcia/vaultwarden/commit/115ccb81b51d84374456e5554e2397f37ba866e9) Adjusted the code bsaed upon review ### 📊 Changes **3 files changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/config.rs` (+9 -2) 📝 `src/db/models/emergency_access.rs` (+1 -1) 📝 `src/main.rs` (+2 -1) </details> ### 📄 Description Since we added the option to show the web-vault version also when running `--version` this causes the config to always be validated. While this is not very bad in general, it could cause the command to quit during the config validation, and not show the version, but also errors. This is probably not very useful for this specific command, unlike the `--backup` for example. To fix this, and preventing the config from being validated, i added an AtomicBool to check if we need to validate the config on first load. This prevents errors, and will just show the Vaultwarden version, and if possible the web-vault version too. Fixes #5046 --- <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:12:38 -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#7193