commandlineparser / commandlineparser/commandline

Just giving --version as argument gives an error

Ouverte
#789 4 commentaires 0 réactions 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

I look around the issues and found a couple of issues that are close to mine but not quite.
The problem I have is just giving the "--version" as a argument gives an error. I can handle the version with .WithNotParsed and write out "version" at the end of the list but it always gives an error too. "--help" works fine without an error.
Am I missing something? Is it also possible to not show the options if you just want to give the version information?

H:\>SEMImages.exe --version
SEMImages 2.0.0.0
Linus Silvander © 2021

ERROR(S):
Option 'version' is unknown.

-f, --file Choose file to analyze. If both a file and directory is given, the file will be used.

-d, --dir Choose directory to analyze. If no directory is given the current path will be used.

--aperture Add aperture size.

--detector Add detector used.

--date Add date when image was taken.

--EHT Add acceleration voltage.

--mag Add magnification.

--stage Add all stage values. Scan rotation is only added if turned on.

--time Add time when image was taken.

--WD Add working distance.

--help Display this help screen.

--version Display version information.

version

H:\>

Guide de contribution

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

Piste de recherche

Commencez par reproduire le comportement signalé de `SEMImages.exe --version` et examinez la manière dont l’analyseur de ligne de commande gère l’option de version par rapport à `--help`. Déterminez si `--version` peut s’exécuter sans erreur d’option inconnue et sans afficher les autres options ; c’est terminé lorsque la sortie de version est renvoyée proprement.

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
35/100

Recevez les nouvelles issues par e-mail

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