adamabdelhamed / PowerArgs

The ultimate .NET Standard command line argument parser
MIT License
569 stars 56 forks source link

PromptIfMissing and If/IfNot combination not working #126

Closed NoBuddyIsPerfect closed 6 years ago

NoBuddyIsPerfect commented 6 years ago

When you define an argument with

ArgRequired(PromptIfMissing = true, If = "Something")

and you run the program with that argument missing (but "Something" specified), it correctly prompts for the missing argument.

However, the entered argument value is not passed to the program.

I have (among others) the following to argmuents defined:

[ArgRequired(IfNot = "Mode | Path", PromptIfMissing = true), ArgShortcut("-f")]
public string File { get; set; }

[ArgRequired(PromptIfMissing = true, If = "File"), ArgShortcut("-l")]
public string FileLabel { get; set; }

If i start the program with no arguments specified, it correctly prompts for both argmuents. But Args.Parse(args) does not populate the entered values....

Could you please have a look?

Regards Denis

adamabdelhamed commented 6 years ago

published