mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-13 18:35:42 -05:00
[PR #5055] [MERGED] Fix --version from failing without config
#7193
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
main← Head:fix-version-info-issue📝 Commits (2)
ad70e59Fix--versionfrom failing without config115ccb8Adjusted 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
--versionthis 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--backupfor 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.