This commit is contained in:
Romulus21
2021-06-05 21:55:28 +02:00
parent 115beadb61
commit ca054a618e

View File

@@ -9,11 +9,12 @@ pub fn read_env_var() {
let mut path = env::var("PWD").unwrap().to_string();
path.push('/');
path.push_str(filename);
println!("{}", path);
fs::read_to_string(path)
fs::read_to_string(path.clone())
.expect("Something went wrong reading the file : device.env");
if let Ok(lines) = read_lines(filename) {
if let Ok(lines) = read_lines(path) {
for line in lines {
if let Ok(var) = line {
let new_var: Vec<&str> = var.split('=').collect();