Skip to content

Fixed misleading expansion variable log message in ci.common - #532

Open
sajeerzeji wants to merge 2 commits into
OpenLiberty:1.xfrom
sajeerzeji:fix/GHMVN2076-Message_update
Open

Fixed misleading expansion variable log message in ci.common#532
sajeerzeji wants to merge 2 commits into
OpenLiberty:1.xfrom
sajeerzeji:fix/GHMVN2076-Message_update

Conversation

@sajeerzeji

Copy link
Copy Markdown
Contributor

Fixes OpenLiberty/ci.maven#2076

Reference: OpenLiberty/ci.maven#2076 (comment)

Moved the log call to after the full string is assembled, so the complete resolved path is shown, and updates the message format to clearly state which variable was expanded, the original expression it appeared in, and the fully resolved result. The corresponding IT assertions in ci.maven and ci.gradle are updated to match the new message format.

@sajeerzeji
sajeerzeji requested a review from venmanyarun August 13, 2026 08:48
@sajeerzeji
sajeerzeji changed the base branch from main to 1.x August 13, 2026 08:49
@venmanyarun
venmanyarun requested a review from cherylking August 19, 2026 12:52

// Log after appendTail so sb holds the complete resolved value
for (String varName : matchedVarNames) {
log.info(String.format("Resolved environment variable \"%s\" in path \"%s\" to \"%s\"", varName, value, sb));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is done at the very end after the while loop...I don't get how it is showing the actual value for the particular variable....every variable that got resolved in the while loop will report the same sb as the value.

Now I understand that in that while loop, this same method got called recursively...so it will also print this log message for those variables. I just don't get the value in repeating the same value and sb for each variable in matchedVarNames.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SVT:Expansion variables needs an improvement for windows

3 participants