mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 18:40:24 +00:00
14 lines
384 B
Rust
14 lines
384 B
Rust
use clap::{crate_version, FromArgMatches, IntoApp};
|
|
use console::style;
|
|
use sqlx_cli::Opt;
|
|
|
|
#[tokio::main]
|
|
async fn main() {
|
|
let matches = Opt::into_app().version(crate_version!()).get_matches();
|
|
|
|
// no special handling here
|
|
if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await {
|
|
println!("{} {}", style("error:").bold().red(), error);
|
|
}
|
|
}
|