commandlineparser / commandlineparser/commandline

Bug: \r\n not removed for last argument

Đang mở
#144 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
C#
Star
4.8k
Fork
478
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

**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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
42/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.