Skip to content
Snippets Groups Projects
user avatar
Mathijs van Veluw authored
* 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>
cd195ff2
History
Name Last commit Last update