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

Fix support for additional arguments in DefaultCommand #368

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Jaagrav
Copy link

@Jaagrav Jaagrav commented Oct 9, 2024

Purpose

In some bal --help commands, after the help text, an error Unmatched argument at index 1: is printed

Goals

Get rid of the error that was caused due to the default command not expecting additional arguments

Approach

Add a CommandLine.Parameters such that we can take in a list of parameters avoiding the error and maybe put it to use in the future instead of modify the bal shell file

User stories

When I first found out about ballerina and started tinkering with it, I ran into this error as well, it didn't make sense to me, and neither did I think it was actually a bug, but when I found this issue, I was relieved cause I spent quite some time trying to figure out how am I typing a --help command wrong. XD

Release note

Fix unmatched argument log when running --help

Closes #309

@CLAassistant
Copy link

CLAassistant commented Oct 9, 2024

CLA assistant check
All committers have signed the CLA.

@Jaagrav
Copy link
Author

Jaagrav commented Oct 10, 2024

Hi @keizer619 PTAL at the changes and lmk if it's the right way to solve this issue?

@Jaagrav
Copy link
Author

Jaagrav commented Oct 18, 2024

Hey @keizer619 any updates here?

Co-authored-by: Gayal Dassanayake <[email protected]>
Copy link

sonarcloud bot commented Oct 24, 2024

@gayaldassanayake
Copy link

I tested and it is working. However had an offline discussion with @keizer619 and I'm not sure if we should support bal --help with additional args. @keizer619 WDYT?

@Jaagrav
Copy link
Author

Jaagrav commented Oct 26, 2024

Any update here? @gayaldassanayake @keizer619 ?

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

Successfully merging this pull request may close these issues.

Unmatched argument log is printed in bal commands with --help flag
3 participants