Merge pull request #776 from trantor/preview_fix

Fix preview map "leaking" with multiple variables
This commit is contained in:
Denis Isidoro 2022-11-15 17:26:00 -03:00 committed by GitHub
commit 13fe757a8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,8 +90,14 @@ impl Runnable for Input {
"{variables}\n{variable} = {value}",
variables = variables,
variable = style(variable_name).with(variable_color),
value = finder::process(value, column, delimiter.as_deref(), map.clone())
.expect("Unable to process value"),
value = if env_var::get(&env_variable_name).is_ok() {
value
} else if is_current {
finder::process(value, column, delimiter.as_deref(), map.clone())
.expect("Unable to process value")
} else {
"".to_string()
}
);
}