mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-23 18:40:24 +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:
@@ -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