Skip to content
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

[dotnet run] No way to ignore arguments specified in launch profile #45832

Open
tmat opened this issue Jan 9, 2025 · 1 comment
Open

[dotnet run] No way to ignore arguments specified in launch profile #45832

tmat opened this issue Jan 9, 2025 · 1 comment
Labels
Milestone

Comments

@tmat
Copy link
Member

tmat commented Jan 9, 2025

If arguments are specified on the command line the arguments specified in launch profile are ignored. However, at least one argument must be specified to ignore the launch profile arguments. There is no way to ignore them and pass no arguments to the app.

This is rather a corner case but the ability is needed to implement Aspire spec correctly in dotnet watch.

Proposal

We propose to add --no-launch-profile-arguments option that forces dotnet run to ignore arguments specified in the launch profile.

Alternatively, we could interpret trailing -- that's not followed by any arguments on the command line as explicitly asking to pass 0 arguments to the app.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-CLI untriaged Request triage from a team member labels Jan 9, 2025
@tmat tmat added this to the 9.0.2xx milestone Jan 9, 2025
@baronfel
Copy link
Member

baronfel commented Jan 9, 2025

Alternatively, we could interpret trailing -- that's not followed by any arguments on the command line as explicitly asking to pass 0 arguments to the app.

We shouldn't do this - it breaks expectations for the behavior of -- in POSIX applications. Having the explicit flag is definitely acceptable though.

@baronfel baronfel removed the untriaged Request triage from a team member label Jan 9, 2025
@baronfel baronfel changed the title [dotnet run] Now way to ignore arguments specified in launch profile [dotnet run] No way to ignore arguments specified in launch profile Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants