commandlineparser / commandlineparser/commandline
Bug: \r\n not removed for last argument
- 主要语言
- C#
- 星标
- 4.8k
- 派生
- 478
- PR 合并指标
- 30 天内没有已合并 PR
描述
**Issue by [Stretto](https://github.com/Stretto)**
_Saturday Jun 17, 2017 at 09:54 GMT_
_Originally opened as https://github.com/gsscoder/commandline/issues/453_
----
I have an app that works fine when ran from the console but fails in visual studio. Seems the last 2 characters a single command, like "app --late" is "--late\r\n" which breaks the parser.
Adding
for(var i = 0; i < args.Length; i++)
args[i] = args[i].Trim('\n','\r');
allows it to work.
贡献指南
这个仓库没有索引到贡献指南
调研方向
The issue names no repository files or tests. Start by tracing how command-line arguments are received and parsed, focusing on the final argument; reproduce the reported case where it includes \r\n and compare it with the provided trimming workaround. Done means the final argument is parsed without trailing carriage-return or newline characters and the behavior is covered by a regression test.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100