Skip to content

Commit 0a97796

Browse files
committed
prepend instead of append when using the ADD rule
1 parent b452361 commit 0a97796

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

EnvForwarder/rules.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ void EnvironmentRules::applyRules(std::string& value, const rules& rules)
8282
{
8383
for (const rule& rule : rules) {
8484
if (rule.type == RULE_ADD) {
85-
if (!value.empty() && !value.ends_with(';')) {
86-
value += ";";
85+
if (!value.empty() && !value.starts_with(';')) {
86+
value = ";" + value;
8787
}
88-
value += rule.expression;
88+
value = rule.expression + value;
8989
}
9090
else if (rule.type == RULE_REMOVE) {
9191
if (!value.empty()) {

0 commit comments

Comments
 (0)