vaultwarden/src
Mathijs van Veluw cd195ff243
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: BlackDex <black.dex@gmail.com>

* Adjusted the code bsaed upon review

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

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
2024-10-11 18:58:25 +02:00
..
api Updates and collection management fixes (#5072) 2024-10-11 18:42:40 +02:00
db Fix --version from failing without config (#5055) 2024-10-11 18:58:25 +02:00
static Actually use Device Type for mails (#4916) 2024-09-18 19:03:15 +02:00
auth.rs Add extra linting (#4977) 2024-09-23 20:25:32 +02:00
config.rs Fix --version from failing without config (#5055) 2024-10-11 18:58:25 +02:00
crypto.rs Remove get_random_64() 2022-11-13 10:03:06 +01:00
error.rs Add extra linting (#4977) 2024-09-23 20:25:32 +02:00
http_client.rs Add extra linting (#4977) 2024-09-23 20:25:32 +02:00
mail.rs Actually use Device Type for mails (#4916) 2024-09-18 19:03:15 +02:00
main.rs Fix --version from failing without config (#5055) 2024-10-11 18:58:25 +02:00
ratelimit.rs Basic ratelimit for user login (including 2FA) and admin login 2021-12-22 21:48:49 +01:00
util.rs Add extra linting (#4977) 2024-09-23 20:25:32 +02:00