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

optic bare command should return exit code 0 #2878

Closed
Relequestual opened this issue Feb 7, 2025 · 2 comments
Closed

optic bare command should return exit code 0 #2878

Relequestual opened this issue Feb 7, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Relequestual
Copy link

Describe the bug
Running CLI command optic should return exit code 0 rather than 1.

To Reproduce
Steps to reproduce the behavior:

  1. Install as instrcuted
  2. run optic and look at the exit code (&& echo "Exit code: $?" || echo "Exit code: $?")

Expected behavior
Should result in exit code 0.
All other OAS Diffing tools tested so far result in a 0 exit code.
I'm using the exit code to check if a tool is installed or not.

Details (please complete the following information):

  • OS and version: MacOS 15.1
  • Optic version: 1.0.6
  • NodeJS version: 22.11.0
@Relequestual Relequestual added the bug Something isn't working label Feb 7, 2025
@acunniffe
Copy link
Member

Looks like this is a commander js default. Hesitant to change it because it's been the default behavior for years and might be relied on in some unexpected ways.
Can you run optic --version ? that returns 0

@Relequestual
Copy link
Author

Relequestual commented Feb 10, 2025

HUm. Yeah I guess I'll have to do that. That may actually be preferable anyway.
Thanks for looking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants