Fix vault manager not showing if no vaults exist

This commit is contained in:
Nystik
2026-03-22 16:29:24 +01:00
parent 5b01a9cdad
commit f14838044d
3 changed files with 9 additions and 4 deletions

View File

@@ -32,8 +32,11 @@ function discoverVaults() {
console.error("[config] Failed to read VAULT_ROOT:", vaultRoot, e.message);
}
// Create a default vault if none exist
if (Object.keys(vaults).length === 0) {
// Optionally create a default vault if none exist
if (
Object.keys(vaults).length === 0 &&
process.env.AUTO_CREATE_DEFAULT === "true"
) {
const defaultPath = path.join(vaultRoot, "My Vault");
try {