mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-05-22 03:23:55 +00: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:
parent
ebe334fcc7
commit
513056f711
3 changed files with 34 additions and 4 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue