Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

context>>#hasFlag: does not work when flag is not specified on the last subcommand #39

Open
demarey opened this issue Jan 18, 2024 · 3 comments

Comments

@demarey
Copy link
Contributor

demarey commented Jan 18, 2024

When you have a command with one or many level of subcommands, there should be a way to ask the context if some flag is present or not.

exemple:

launcher image create fromPR 9588 --no-launch

In the example, the --no-launch flag is specified on the create subcommand spec.
When asking #hasFlag: #'no-launch' to the context, it will search on the last subcommand: fromPR and by so will not find it.
It should search from the command where it has been specified

@Bajger
Copy link
Contributor

Bajger commented Jan 19, 2024

@demarey I think this is because you need to specify flag name with pound sign: e.g. self hasFlag: #no-launch (see senders).

@demarey
Copy link
Contributor Author

demarey commented Jan 19, 2024

It is true that self hasFlag: #no-launch has to be used but it was only an error in the description.
The problem described is there: there is an issue with parameters lookup.

@Bajger
Copy link
Contributor

Bajger commented Jan 19, 2024

Ok,got it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants