Skip to content

Commit 0b1457a

Browse files
committed
fix(cli): share the database selection guard across both backends
1 parent 233a31a commit 0b1457a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎crates/apps/gfa-cli/src/main.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ fn parse_with_env(
2626
while let Some(option) = args.next() {
2727
match option.as_str() {
2828
"--help" | "-h" => return Ok(None),
29-
"--sqlite" if !sqlite_seen => {
29+
"--sqlite" if !database_seen => {
3030
let path = args.next().ok_or("--sqlite requires a path")?;
3131
if path.is_empty() || path.starts_with("--") {
3232
return Err("--sqlite requires a path".into());
3333
}
3434
config.database = Database::Sqlite(PathBuf::from(path));
35-
sqlite_seen = true;
35+
database_seen = true;
3636
}
3737
#[cfg(feature = "postgres")]
3838
"--postgres-env" if !database_seen => {

0 commit comments

Comments
 (0)