/
germanubis
/
sqlx
ΠΠ±Π·ΠΎΡ
ΠΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡ
ΠΠΎΠΉΡΠΈ
/
germanubis
/
sqlx
ΠΠΎΠ΄
ΠΠ°ΠΏΡΠΎΡΡ
0
ΠΠ°Π΄Π°ΡΠΈ
ΠΠΈΠΊΠΈ
ΠΠ°ΠΊΠ΅ΡΡ
0
Π Π΅Π»ΠΈΠ·Ρ
0
ΠΠ½Π°Π»ΠΈΡΠΈΠΊΠ°
ΠΠ΅Π·ΠΎΠΏΠ°ΡΠ½ΠΎΡΡΡ
v0.5.2
sqlx-cli/src/bin/cargo-sqlx.rs
22 ΡΡΡΠΎΠΊΠΈ
706 B
Jonas Platte
cargo-sqlx-cli: Fix exiting with 0 on failure
24 ΠΈΡΠ» 2020, 17:54
24 ΠΈΡΠ» 2020, 17:54
979ddeb
ΠΠΎΠ΄
ΠΠ²ΡΠΎΡΡΡΠ²ΠΎ
Π ΡΡΠΌ ΠΊΠΎΠ΄?
use clap::{crate_version, AppSettings, FromArgMatches, IntoApp}; use console::style; use sqlx_cli::Opt; use std::{env, process}; #[tokio::main] async fn main() { // when invoked as `cargo sqlx [...]` the args we see are `[...]/sqlx-cli sqlx prepare` // so we want to notch out that superfluous "sqlx" let args = env::args_os().skip(2); let matches = Opt::into_app() .version(crate_version!()) .bin_name("cargo sqlx") .setting(AppSettings::NoBinaryName) .get_matches_from(args); if let Err(error) = sqlx_cli::run(Opt::from_arg_matches(&matches)).await { println!("{} {}", style("error:").bold().red(), error); process::exit(1); } }