1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-05-11 03:28:54 +02:00

Continue to allow using $BWRS_VERSION

Dieser Commit ist enthalten in:
Jake Howard 2022-01-01 12:27:28 +00:00
Ursprung 8e2f708e50
Commit 687435c8b2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 57AFB45680EDD477

Datei anzeigen

@ -76,7 +76,15 @@ const HELP: &str = "\
-v, --version Prints the app version
";
pub const VERSION: Option<&str> = option_env!("VW_VERSION");
// HACK: Option::or cannot be used in a constant context
const fn get_version() -> Option<&'static str> {
let bwrs_version = option_env!("BWRS_VERSION");
match bwrs_version {
Some(_) => bwrs_version,
None => option_env!("VW_VERSION"),
}
}
pub const VERSION: Option<&str> = get_version();
fn parse_args() {
let mut pargs = pico_args::Arguments::from_env();