Skip to content

Hidi returns exit code 0 even when failing on mac #900

Closed

Description

@fellnerse

Hello here is the log form my terminal:

bash-3.2$ hidi validate -d core/openapi.yml -ll trace
trce: Microsoft.OpenApi.Hidi.OpenApiService[0]
      => Reading input stream
      5ms: Read file core/openapi.yml
crit: Microsoft.OpenApi.Hidi.OpenApiService[0]
      OpenAPI specification version '' is not supported.
bash-3.2$ echo $?
0
bash-3.2$ hidi --version
1.0.0-preview4+b04aecd4a4955f71bc8f1a21ac74b8ac0976cb2a

The file I'm validating is just wrong for the purpose of demonstration, it starts like this:

openapiWRONG: 3.0.3
...

Do you have an idea how I can get the correct exit code? It seems like it does not even print to the stderr but everything is printed to stdout.

Activity

  1. zengin commented on Jun 8, 2022

    @zengin
    Contributor

    might be related: microsoft/kiota#1605

  2. fellnerse commented on Jun 13, 2022

    @fellnerse
    Author

    I'm not sure thats a different repo; but if the same fix works I'd be happy! its really annoying to have to parse the output of the tool

  3. added this to the NET:1.4 milestone on Jun 30, 2022
  4. added
    priority:p2Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 days
    on Jul 12, 2022
  5. fellnerse commented on Jan 3, 2023

    @fellnerse
    Author

    No this is not fixed:

    bash-3.2$ hidi validate -d public/openapi.yml2 --ll Trace
    crit: Microsoft.OpenApi.Hidi.OpenApiService[0]
          Could not validate the document, reason: Could not open the file at public/openapi.yml2
    bash-3.2$ echo $?
    0
    bash-3.2$ hidi --version
    1.1.0+40d67ac929299fd007cc6bf9e5cf44e83187f948

    Might make sense to validate such things before closing an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority:p2Medium. Generally has a work-around and a smaller sub-set of customers is affected. SLA <=30 daystype:bugA broken experience

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions