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:
Austin Bonander
2022-07-28 14:33:44 -07:00
committed by GitHub
parent 05d64fb722
commit a2eceec33b
32 changed files with 70 additions and 62 deletions

View File

@@ -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",

View File

@@ -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 {

View File

@@ -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);