feat: finish v1 of both cli and embedded migrations

This commit is contained in:
Ryan Leckey
2020-07-12 03:43:49 -07:00
parent b920aa1c55
commit 61e4a4f566
37 changed files with 1525 additions and 890 deletions

View File

@@ -1,8 +1,13 @@
use sqlx_cli::Command;
use structopt::StructOpt;
use clap::{crate_version, FromArgMatches, IntoApp};
use console::style;
use sqlx_cli::Opt;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
async fn main() {
let matches = Opt::into_app().version(crate_version!()).get_matches();
// no special handling here
sqlx_cli::run(Command::from_args()).await
if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await {
println!("{} {}", style("error:").bold().red(), error);
}
}