fix: make path to env files depend of the CARGO_MANIFEST_DIR of sesam-vitale crate
This commit is contained in:
@ -3,9 +3,9 @@ extern crate dotenv;
|
||||
|
||||
use libc::{ c_char, c_void, c_ushort, size_t };
|
||||
use std::ffi::CString;
|
||||
use std::path::PathBuf;
|
||||
use std::ptr;
|
||||
|
||||
use dotenv::dotenv;
|
||||
use std::env;
|
||||
|
||||
extern "C" {
|
||||
@ -72,7 +72,9 @@ fn ssv_lire_config() {
|
||||
}
|
||||
|
||||
pub fn demo() {
|
||||
dotenv().ok();
|
||||
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let manifest_path = PathBuf::from(manifest_dir);
|
||||
dotenv::from_path(manifest_path.join(".env")).ok();
|
||||
|
||||
println!("------- Demo for the SSV library --------");
|
||||
|
||||
|
Reference in New Issue
Block a user