mirror of
https://github.com/dani-garcia/vaultwarden.wiki.git
synced 2026-10-23 18:28:10 +03:00
Check for data folder on startup
Currently, when starting up for the first time (running standalone, outside of Docker), bitwarden_rs panics when the `openssl` tool isn't able to create `data/rsa_key.pem` due to the `data` dir not existing. Instead, print a more helpful error message telling the user to create the directory.
This commit is contained in:
1 parent
ebe334fcc7
commit
513056f711
3 files changed
+34
-4
No files matched your search
@@ -358,6 +358,15 @@ pub fn format_naive_datetime_local(dt: &NaiveDateTime, fmt: &str) -> String {
|
||||
format_datetime_local(&Local.from_utc_datetime(dt), fmt)
|
||||
}
|
||||
|
||||
//
|
||||
// Deployment environment methods
|
||||
//
|
||||
|
||||
/// Returns true if the program is running in Docker or Podman.
|
||||
pub fn is_running_in_docker() -> bool {
|
||||
Path::new("/.dockerenv").exists() || Path::new("/run/.containerenv").exists()
|
||||
}
|
||||
|
||||
//
|
||||
// Deserialization methods
|
||||
//
|
||||
|
||||
Reference in new issue
Block a user