-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Set runtime config values for path to executing script #49330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
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 sets runtime configuration values for the path to the executing script and updates tests to verify the new behavior.
- Updated the project file generation to include runtime configuration options for file and directory paths.
- Extended test cases to validate different scenarios including relative paths, paths with spaces, and Unicode characters.
- Added support for configuring standard output encoding in test commands and command implementations.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs | Added ItemGroup elements for runtime config options and multiple new tests covering various path scenarios. |
test/Microsoft.NET.TestFramework/Commands/TestCommand.cs | Introduced StandardOutputEncoding property and fluent setter to allow customizing output encoding in tests. |
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs | Updated project file generation to include runtime configuration options for entry point paths. |
src/Cli/Microsoft.DotNet.Cli.Utils/ICommand.cs | Added interface method for setting standard output encoding. |
src/Cli/Microsoft.DotNet.Cli.Utils/Command.cs | Implemented StandardOutputEncoding to correctly set the process output encoding. |
src/Cli/Microsoft.DotNet.Cli.Utils/BuiltInCommand.cs | Introduced a stub for StandardOutputEncoding that currently throws NotImplementedException. |
@dotnet/run-file for reviews please :) |
Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>
@marcpopMSFT can you merge this? |
AppContext is nicer than environment variables, which could propagate to child processes for which they are not appropriate. |
The watch, container, and completion failures are all known. Merging per request. |
Closes #49184
I had to update the test infrastructure slightly to enable one of the tests I added. I did that in the second commit so you can see it separate from the actual implementation.