commandlineparser / commandlineparser/commandline

Bug: \r\n not removed for last argument

Aberta
#144 0 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
C#
Estrelas
4.8k
Forks
478
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

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

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
csharp
Domínio
cli
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
42/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.