Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jul 30, 2025

The ilverify.ps1 script was unconditionally passing $additional_arguments to the build script, even when it was an empty string. On Linux/macOS systems, $additional_arguments is set to an empty string, which caused the build script to receive an invalid empty argument, resulting in errors like:

Invalid argument: 
Common settings:
  --configuration <value>        Build configuration: 'Debug' or 'Release' (short: -c)
  ...

This fix adds a conditional check to only pass $additional_arguments when it contains a non-empty value:

Before:

& $script -c $configuration $additional_arguments

After:

if ($additional_arguments) {
    & $script -c $configuration $additional_arguments
} else {
    & $script -c $configuration
}

This ensures that:

  • On Windows: $additional_arguments contains -noVisualStudio and is passed correctly
  • On Linux/macOS: No empty argument is passed to the build script

Fixes the IL verification build failures on non-Windows platforms.

This pull request was created as a result of the following prompt from Copilot chat.

The script ilverify.ps1 currently always passes $additional_arguments to the build script, even when it is an empty string. This causes an empty argument to be passed to the underlying shell script on Linux, resulting in errors like 'Invalid argument: '. The script should be updated to only pass $additional_arguments when it is non-empty.

Suggested fix: Replace
& $script -c $configuration $additional_arguments
with
if ($additional_arguments) {
& $script -c $configuration $additional_arguments
} else {
& $script -c $configuration
}
This prevents empty arguments from being passed to the build script.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Avoid passing empty $additional_arguments to build script in ilverify.ps1 Fix empty argument passing in ilverify.ps1 for Linux builds Jul 30, 2025
Copilot AI requested a review from T-Gro July 30, 2025 15:51
Copilot finished work on behalf of T-Gro July 30, 2025 15:51
@T-Gro T-Gro marked this pull request as ready for review July 31, 2025 08:45
@T-Gro T-Gro requested a review from a team as a code owner July 31, 2025 08:45
@github-actions
Copy link
Contributor

✅ No release notes required

@T-Gro T-Gro enabled auto-merge (squash) July 31, 2025 08:45
@T-Gro T-Gro merged commit 82e4f15 into main Jul 31, 2025
40 checks passed
@T-Gro T-Gro deleted the copilot/fix-2ff66e58-0de0-4269-b6b8-a974bf74328e branch September 8, 2025 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants