1
0
Fork 1
Spiegel von https://github.com/dani-garcia/vaultwarden.git synchronisiert 2024-11-16 04:12:53 +01:00

Merge branch 'custom-env-path' of https://github.com/TinfoilSubmarine/vaultwarden into TinfoilSubmarine-custom-env-path

Dieser Commit ist enthalten in:
Daniel García 2022-02-27 21:21:38 +01:00
Commit 94201ca133
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FC8A7D14C3CD543A
2 geänderte Dateien mit 6 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -3,6 +3,11 @@
## ##
## Be aware that most of these settings will be overridden if they were changed ## Be aware that most of these settings will be overridden if they were changed
## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json . ## in the admin interface. Those overrides are stored within DATA_FOLDER/config.json .
##
## By default, vaultwarden expects for this file to be named ".env" and located
## in the current working directory. If this is not the case, the environment
## variable ENV_FILE can be set to the location of this file prior to starting
## vaultwarden.
## Main data folder ## Main data folder
# DATA_FOLDER=data # DATA_FOLDER=data

Datei anzeigen

@ -56,7 +56,7 @@ macro_rules! make_config {
impl ConfigBuilder { impl ConfigBuilder {
#[allow(clippy::field_reassign_with_default)] #[allow(clippy::field_reassign_with_default)]
fn from_env() -> Self { fn from_env() -> Self {
match dotenv::from_path(".env") { match dotenv::from_path(get_env("ENV_FILE").unwrap_or_else(|| String::from(".env"))) {
Ok(_) => (), Ok(_) => (),
Err(e) => match e { Err(e) => match e {
dotenv::Error::LineParse(msg, pos) => { dotenv::Error::LineParse(msg, pos) => {