diff --git a/Cargo.lock b/Cargo.lock index 24569b0..c9e85b2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -462,7 +462,7 @@ checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" [[package]] name = "rustic-backup" -version = "0.1.0" +version = "0.1.1" dependencies = [ "anyhow", "human-panic", diff --git a/Cargo.toml b/Cargo.toml index 3320896..36f8712 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustic-backup" -version = "0.1.0" +version = "0.1.1" description = "Restic wrapper for convenient backups" authors = ["Ben Navetta "] readme = "README.md" diff --git a/src/restic.rs b/src/restic.rs index b2bd171..804e71f 100644 --- a/src/restic.rs +++ b/src/restic.rs @@ -148,7 +148,7 @@ fn add_credentials(profile: &Profile, env: &mut HashMap) -> environment_file.display() ) })?; - let env_vars: HashMap = + let env_vars: HashMap = toml::from_str(&env_contents).with_context(|| { format!( "Could not parse environment file {}", @@ -156,7 +156,7 @@ fn add_credentials(profile: &Profile, env: &mut HashMap) -> ) })?; for (var, value) in env_vars { - env.insert(var, value); + env.insert(var.into(), value.into()); } }