feat(rust): skip identity override is vault already existed
@@ -135,6 +135,8 @@ impl NodeManager {
LmdbStorage::new(&authenticated_storage_path).await?
};
+ // Skip override if we already had vault
+ if config.readlock_inner().vault_path.is_none() {
if let Some(identity_override) = identity_override {
// Copy vault file, update config
let vault_path = Self::default_vault_path(&node_dir);
@@ -147,6 +149,7 @@ impl NodeManager {
config.persist_config_updates().map_err(map_anyhow_err)?;
}
+ }
// Check if we had existing Vault
let vault_path = config.readlock_inner().vault_path.clone();
