feat: add dotenv to load migra config
This commit is contained in:
parent
26a0ddb8aa
commit
9e5c2192d4
2 changed files with 11 additions and 4 deletions
|
@ -24,9 +24,13 @@ path = "tests/commands.rs"
|
|||
structopt = "0.3"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
toml = "0.5"
|
||||
chrono = "0.4.19"
|
||||
postgres = "0.19.0"
|
||||
chrono = "0.4"
|
||||
postgres = "0.19"
|
||||
dotenv = { version = "0.15", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
assert_cmd = "1.0.3"
|
||||
predicates = "1.0.7"
|
||||
assert_cmd = "1"
|
||||
predicates = "1"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
|
|
@ -13,6 +13,9 @@ use opts::{AppOpt, Command, StructOpt};
|
|||
use std::io;
|
||||
|
||||
fn main() -> StdResult<()> {
|
||||
#[cfg(feature = "dotenv")]
|
||||
dotenv::dotenv().ok();
|
||||
|
||||
let opt = AppOpt::from_args();
|
||||
|
||||
match opt.command {
|
||||
|
|
Reference in a new issue