Skip to content

Problem with windows username that sometimes end in $#3

Open
zparta wants to merge 2 commits into
loupeteam:mainfrom
zparta:main
Open

Problem with windows username that sometimes end in $#3
zparta wants to merge 2 commits into
loupeteam:mainfrom
zparta:main

Conversation

@zparta

@zparta zparta commented Apr 10, 2026

Copy link
Copy Markdown

What:

changed to manipulate the string before adding it to the file.

Why:

Problem occurs when the username has a $ in it.

zparta added 2 commits April 10, 2026 14:17
I had a problem where on some windows users their AS_USER_NAME ends in a $ so this snippet fixes that.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the RevInfo.var generation script to sanitize the AS_USER_NAME value before writing it as the builder string, addressing cases where Windows usernames may end with a $.

Changes:

  • Modify the builder field generation to strip $ characters from the username before writing RevInfo.var.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

buildDate : STRING[80] := '$(date +"%Y-%m-%d %H:%M:%S %z")';
buildConfiguration : STRING[80] := '${AS_CONFIGURATION}';
builder : STRING[80] := '${AS_USER_NAME}';
builder : STRING[80] := '$(echo "${AS_USER_NAME}" | sed 's/\$//g')';

Copilot AI Apr 14, 2026

Copy link

Choose a reason for hiding this comment

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

The quoting in this line is broken: the outer single-quoted string for the .var value is terminated by the inner sed 's/\$//g', which will cause a shell syntax error and/or generate an invalid RevInfo.var. Use a quoting-safe approach (e.g., shell parameter expansion like ${AS_USER_NAME%\$} to strip a trailing $, or keep sed but quote it with double-quotes and escape $). Also consider stripping only a trailing $ rather than removing all $ characters.

Suggested change
builder : STRING[80] := '$(echo "${AS_USER_NAME}" | sed 's/\$//g')';
builder : STRING[80] := '${AS_USER_NAME%\$}';

Copilot uses AI. Check for mistakes.
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.

2 participants