commandlineparser / commandlineparser/commandline

Bug: \r\n not removed for last argument

Ouverte
#144 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
C#
Étoiles
4.8k
Forks
478
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
csharp
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
42/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.