mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 10:38:57 +00:00
chore: replace dotenv with dotenvy (#2003)
* chore: replace `dotenv` with `dotenvy` The former appears to be unmaintained and the latter is a drop-in replacement. * chore: fix all warnings
This commit is contained in:
@@ -25,7 +25,7 @@ name = "cargo-sqlx"
|
||||
path = "src/bin/cargo-sqlx.rs"
|
||||
|
||||
[dependencies]
|
||||
dotenv = "0.15.0"
|
||||
dotenvy = "0.15.0"
|
||||
tokio = { version = "1.15.0", features = ["macros", "rt", "rt-multi-thread"] }
|
||||
sqlx = { version = "0.6.0", path = "..", default-features = false, features = [
|
||||
"migrate",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use clap::Parser;
|
||||
use console::style;
|
||||
use dotenv::dotenv;
|
||||
use sqlx_cli::Opt;
|
||||
use std::process;
|
||||
|
||||
@@ -14,7 +13,7 @@ enum Cli {
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv().ok();
|
||||
dotenvy::dotenv().ok();
|
||||
let Cli::Sqlx(opt) = Cli::parse();
|
||||
|
||||
if let Err(error) = sqlx_cli::run(opt).await {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
use clap::Parser;
|
||||
use console::style;
|
||||
use dotenv::dotenv;
|
||||
use sqlx_cli::Opt;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv().ok();
|
||||
dotenvy::dotenv().ok();
|
||||
// no special handling here
|
||||
if let Err(error) = sqlx_cli::run(Opt::parse()).await {
|
||||
println!("{} {}", style("error:").bold().red(), error);
|
||||
|
||||
Reference in New Issue
Block a user