dotnet / dotnet/command-line-api

Parameter starting with @ is interpreted as a response file path

Open
#816 7 comments 2 reactions 0 assignees View on GitHub
Area-Parser and Binder bug
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

My app accepts a password as a command line argument, an example...

```
MyApp.exe --password @123#456
```

Unfortunately, the @ results in failure, as the dragonfruit subsystem thinks it is a response file and tries (and fails) to locate it as a file on the filesystem.

Would it be possible to allow for the @ character to either be escaped, or handle the exception of failing to open a response file and allow the arguments to pass through to the app unaltered?

Currently the behaviors is to throw an unhandled exception and crash...

```
System.Security.Permissions.FileIOPermission.EmulateFileIOPermissionChecks
```

Found in System.CommandLine.DragonFruit v0.3.0-alpha.20158.1

Cheers
Jonathan

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.