feat: v1.7.7, support exec-env comment

This commit is contained in:
2024-01-13 11:02:01 +08:00
parent 784765fbb9
commit e31f6d49b7
3 changed files with 5 additions and 3 deletions

View File

@@ -145,7 +145,9 @@ fn parse_output_to_env(output: &str) -> Vec<(String, String)> {
} else {
let lines = output.split('\n');
lines.filter(|ln| !ln.trim().is_empty()).for_each(|ln| {
if ln.contains('=') {
if ln.starts_with('#') {
debugging!("Found comment: {}", ln);
} else if ln.contains('=') {
let k = ln.chars().take_while(|c| c != &'=').collect::<String>();
let v = ln.chars().skip_while(|c| c != &'=').skip(1).collect::<String>();
env.push((k, v));