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

[bug]: keploy CLI logs error message when command is unknown #1328

Closed
1 task done
narharim opened this issue Jan 10, 2024 · 7 comments
Closed
1 task done

[bug]: keploy CLI logs error message when command is unknown #1328

narharim opened this issue Jan 10, 2024 · 7 comments
Labels
bug Something isn't working Good First Issue Good for newcomers keploy

Comments

@narharim
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

Current behavior:
when I run keploy exampl instead of keploy example it logs failed to start the CLI.

version: 2.0.0-alpha56

Error: unknown command "exampl" for "keploy"

Did you mean this?
	example

Run 'keploy --help' for usage.
🐰 Keploy: 2024-01-10T16:15:03+05:30 	ERROR	failed to start the CLI.	{"error": "unknown command \"exampl\" for \"keploy\"\n\nDid you mean this?\n\texample\n"}

Expected behavior:

It should exit without logging.

Steps to reproduce

Follow installation guide for linux and run keploy

Environment

None

Version

Local

Repository

keploy

@narharim narharim added the bug Something isn't working label Jan 10, 2024
Copy link

Thank you and congratulations 🎉 for opening your very first issue in keploy

@TheLazron
Copy link

Can I be assigned this issue please?

@heyyakash
Copy link
Contributor

Hello. It seems the logger is logging out the error in root.go file before exiting. I have tried removing it on my local build and the output looks something like this? Is this what you are referring to? If yes, then can I be assigned this issue?
Screenshot from 2024-01-14 16-31-27

@shivamsouravjha
Copy link
Contributor

shivamsouravjha commented Jan 31, 2024

Expected behaviour: not print the warning log incase of unknown command.

image

@shivamsouravjha shivamsouravjha added the Good First Issue Good for newcomers label Feb 8, 2024
@PranshuSrivastava
Copy link
Member

Sure @TheLazron you can go ahead and open a PR for it, if anyone else also opens one, it will be merged on a first come first serve basis

@varun7singh
Copy link

Hey @PranshuSrivastava i went through the Cobra docs and it returns an *error.errorString so the way i see it we can perform some string operations or regex to extract the type of error but am not too sure if that is the optimal way, will be opening a pr do let me know.
Thanks!!

@shivamsouravjha
Copy link
Contributor

this issue seems to be resolved after the new update however a similar issue has surfaced. #1853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Good First Issue Good for newcomers keploy
Projects
None yet
6 participants