Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmicu committed Dec 17, 2023
1 parent 80b495f commit c052d97
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ async fn main() -> Result<(), sqlx::Error> {
let mut destination = String::new();

{
// TODO: Add a --yes flag, and set a flag called Valve.interactive. And then in the
// create_missing_tables() function, prompt the user to confirm when a table needs
// to be recreated automatically due to a change, unless the --yes flag is set. Note
// that Valve.interactive is only applicable to the command line. It should never be set
// when using valve as a library.

// this block limits scope of borrows by ap.refer() method
let mut ap = ArgumentParser::new();
ap.set_description(
Expand Down Expand Up @@ -131,6 +125,7 @@ async fn main() -> Result<(), sqlx::Error> {
config_table = "table".to_string();
}

let interactive = !yes;
if api_test {
run_api_tests(&source, &destination).await?;
} else if dump_config {
Expand All @@ -140,7 +135,7 @@ async fn main() -> Result<(), sqlx::Error> {
&destination,
verbose,
initial_load,
yes,
interactive,
)
.await?;
let mut config = valve.global_config.clone();
Expand All @@ -167,7 +162,7 @@ async fn main() -> Result<(), sqlx::Error> {
&destination,
verbose,
initial_load,
yes,
interactive,
)
.await?;
valve.drop_all_tables().await?;
Expand All @@ -178,7 +173,7 @@ async fn main() -> Result<(), sqlx::Error> {
&destination,
verbose,
initial_load,
yes,
interactive,
)
.await?;
valve.create_all_tables().await?;
Expand All @@ -189,7 +184,7 @@ async fn main() -> Result<(), sqlx::Error> {
&destination,
verbose,
initial_load,
yes,
interactive,
)
.await?;
valve.load_all_tables(true).await?;
Expand Down

0 comments on commit c052d97

Please sign in to comment.