fix: respect --force flag during index and partition creation

The index creation routine now uses the CLI `--force` argument instead of a hardcoded false value, enabling explicit overwrite control. Partition existence checks also verify for the designated subdirectory rather than the root path, ensuring conflict detection and cleanup only trigger when an actual partition layout exists.
This commit is contained in:
Eric Coissac committed 2026-08-16 11:37:26 +02:00
1 parent dd889854cb
commit e2b9374426
2 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -225,7 +225,7 @@ pub fn run(args: IndexArgs) {
}
info
});
KmerIndex::create(&output, config, genome_info, false).unwrap_or_else(|e| {
KmerIndex::create(&output, config, genome_info, args.force).unwrap_or_else(|e| {
eprintln!("error creating index: {e}");
std::process::exit(1);
})