Giter Site home page Giter Site logo

Fail on cmd fail about nvchecker HOT 6 CLOSED

aminvakil avatar aminvakil commented on June 18, 2024
Fail on cmd fail

from nvchecker.

Comments (6)

lilydjwg avatar lilydjwg commented on June 18, 2024

Do you mean that you want to get a non-zero exit code when there is any error from any entry? I can add a cmdline flag if you want this behavior. It's not possible to signal which error occurs with the exit code though.

The current design is that, you filter error messages from the json log output and process them.

from nvchecker.

aminvakil avatar aminvakil commented on June 18, 2024

Do you mean that you want to get a non-zero exit code when there is any error from any entry? I can add a cmdline flag if you want this behavior. It's not possible to signal which error occurs with the exit code though.

What do you think yourself about this? Do you expect an error when something goes wrong (and it returns non-zero code) in cmd section? I think it should fail from my POV. But if you think there are situations which failing is fine, this can be a flag.

The current design is that, you filter error messages from the json log output and process them.

I think any non-zero return code is an error and there is no need to filter the output to see what has happened, if the result has changed nvchecker will notice already.

from nvchecker.

lilydjwg avatar lilydjwg commented on June 18, 2024

Do you expect an error when something goes wrong (and it returns non-zero code) in cmd section?

No. There are a lot of entries to check, and it's expected that some of them fail for one reason or another (e.g. network issues, upstream downtime). A non-zero status code says little about what goes wrong.

I think any non-zero return code is an error and there is no need to filter the output to see what has happened.

Well, you can raise the log level to see only warnings and errors.

from nvchecker.

aminvakil avatar aminvakil commented on June 18, 2024

No. There are a lot of entries to check, and it's expected that some of them fail for one reason or another (e.g. network issues, upstream downtime). A non-zero status code says little about what goes wrong.

What about something like any_error_fatal = true to make nvchecker fail in case there was any failure in that section?
Can this be added so that it can be configured per software?

from nvchecker.

lilydjwg avatar lilydjwg commented on June 18, 2024

I can add an option to indicate errors with exit code, but it wouldn't be fatal -- there is no reason to give up other entries if one entry fails.

I'll try to come up with a patch tomorrow if it's okey for you.

from nvchecker.

aminvakil avatar aminvakil commented on June 18, 2024

I can add an option to indicate errors with exit code, but it wouldn't be fatal -- there is no reason to give up other entries if one entry fails.

I meant exactly the same thing, fatal for the entry that error has happened, feel free to change its name to whatever you see fit.

I'll try to come up with a patch tomorrow if it's okey for you.

Come up with a patch next year if you want :) I have not employed you, thanks for your time!

from nvchecker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.