Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiorowski committed Mar 17, 2024
1 parent b1f161a commit cea0aa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ fn show_variables(file_path: &PathBuf) -> Result<String> {
let lines = var_file.split('\n').collect::<Vec<&str>>();
let mut var_str: String = "".to_string();
for ele in lines {
let mut ele = ele.split('=').collect::<Vec<&str>>();
// split only the first =
let mut ele = ele.splitn(2, '=').collect::<Vec<&str>>();
if ele.len() == 2 {
ele[0] = ele[0].trim();
ele[1] = ele[1].trim();
Expand Down

0 comments on commit cea0aa2

Please sign in to comment.