Skip to content
Snippets Groups Projects
Unverified Commit cd195ff2 authored by Mathijs van Veluw's avatar Mathijs van Veluw Committed by GitHub
Browse files

Fix `--version` from failing without config (#5055)


* Fix `--version` from failing without config

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

Signed-off-by: default avatarBlackDex <black.dex@gmail.com>

* Adjusted the code bsaed upon review

Signed-off-by: default avatarBlackDex <black.dex@gmail.com>

---------

Signed-off-by: default avatarBlackDex <black.dex@gmail.com>
parent e3541763
No related branches found
Tags 1.32.6+tedomum.1
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment