dotnet / dotnet/command-line-api

Add support for Environment.ExpandEnvironmentVariables

Open
#708 0 comments 6 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

There seems to be no way to use Environment.ExpandEnvironmentVariables in the parsing process to expand arguments which might need it. The only way at this stage is to do this on all the arguments passed into `Main` such as `args.Select(arg => Environment.ExpandEnvironmentVariables(arg)).ToArray()`.

It would be nice to be able to specify that an argument should be expanded.

It appears that adding middleware is too late in the process, as the Tokens are in a read-only list.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.