Skip to content

Fix PowerShell $ escaping and indentation in GenBuildInfo.ps1#25

Merged
Timthreetwelve merged 2 commits into
mainfrom
copilot/fix-code-review-comment-24
Jul 3, 2026
Merged

Fix PowerShell $ escaping and indentation in GenBuildInfo.ps1#25
Timthreetwelve merged 2 commits into
mainfrom
copilot/fix-code-review-comment-24

Conversation

Copilot AI commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Inside a PowerShell expandable (double-quoted) string, an unescaped $ triggers variable interpolation. The two C# interpolated-string literals ($"...") were being silently mangled — PowerShell would attempt to expand the following token as a variable, effectively dropping the $ from the generated .cs file.

Changes

  • $ escaping — Replaced bare $ with `$ on the two affected lines so the literal $ is preserved in the generated C# output:

    # Before — $ gets interpolated/dropped by PowerShell
    public static readonly string BuildDateStringUtc = $`"{BuildDateUtc:f}  (UTC)`";
    
    # After — `$ emits a literal $ in the output file
    public static readonly string BuildDateStringUtc = `$`"{BuildDateUtc:f}  (UTC)`";
  • Indentation — Fixed VersionString declaration which had 7 leading spaces instead of the consistent 4 used by all other class members.

@Timthreetwelve Timthreetwelve marked this pull request as ready for review July 3, 2026 19:36
Copilot AI review requested due to automatic review settings July 3, 2026 19:36

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.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.


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

Copilot AI changed the title [WIP] Fix code as per review comment on pull request 24 Fix PowerShell $ escaping and indentation in GenBuildInfo.ps1 Jul 3, 2026
Copilot AI requested a review from Timthreetwelve July 3, 2026 19:36
@Timthreetwelve Timthreetwelve merged commit f778ec3 into main Jul 3, 2026
@Timthreetwelve Timthreetwelve deleted the copilot/fix-code-review-comment-24 branch July 3, 2026 19:37
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.

3 participants