{"record":{"id":"b5d9ab49842aeea7","repo":"ajeetdsouza/zoxide","slug":"current-database-is-not-empty-specify-merge-to","errorCode":null,"errorMessage":"current database is not empty, specify --merge to continue anyway","messagePattern":"current database is not empty, specify --merge to continue anyway","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/cmd/import.rs","lineNumber":11,"sourceCode":"use anyhow::{Result, bail};\n\nuse crate::cmd::{Import, ImportFrom, Run};\nuse crate::db::Database;\nuse crate::import;\n\nimpl Run for Import {\n    fn run(&self) -> Result<()> {\n        let mut db = Database::open()?;\n        if !self.merge && !db.dirs().is_empty() {\n            bail!(\"current database is not empty, specify --merge to continue anyway\");\n        }\n\n        match self.from {\n            ImportFrom::Atuin => import::run(&import::Atuin {}, &mut db)?,\n            ImportFrom::Autojump => import::run(&import::Autojump {}, &mut db)?,\n            ImportFrom::Fasd => import::run(&import::Fasd {}, &mut db)?,\n            ImportFrom::Z => import::run(&import::Z {}, &mut db)?,\n            ImportFrom::ZLua => import::run(&import::ZLua {}, &mut db)?,\n            ImportFrom::ZshZ => import::run(&import::ZshZ {}, &mut db)?,\n        }\n\n        db.save()\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":26,"githubUrl":"https://github.com/ajeetdsouza/zoxide/blob/8a3f76da90cc12547b593ca210b8fdfb1631d07f/src/cmd/import.rs#L1-L26","documentation":"Error \"current database is not empty, specify --merge to continue anyway\" thrown in ajeetdsouza/zoxide.","triggerScenarios":"Thrown at src/cmd/import.rs:11 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run the import with the --merge flag to merge into the existing database","Remove the existing database file first if you want a fresh import"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8a3f76da90cc12547b593ca210b8fdfb1631d07f","analyzedAt":"2026-08-19T03:25:13.308Z","contentChangedAt":"2026-08-19T03:25:13.308Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}