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

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