Giter VIP home page Giter VIP logo

Comments (5)

zbentley avatar zbentley commented on August 23, 2024

This is at master, btw; not 1.5.0.

from puppet-homebrew.

jordigg avatar jordigg commented on August 23, 2024

Will investigate, thought was already handled and tested: https://github.com/TheKevJames/puppet-homebrew/blob/master/lib/puppet/provider/package/brewcask.rb#L21

Maybe is because some of the error messages are sent via stdout and the others via strerr and so we don't show all of them back to the user.

from puppet-homebrew.

zbentley avatar zbentley commented on August 23, 2024

The STDOUT/STDERR thing seems likely. Would it be possible to interleave the two streams (merge on IFS or \n or something sensible) using some Ruby tool, store the union as the output, and print that out for the user if there is an error?

Alternatively, if adding a dependency on the shell for command execution is acceptable, you could change the underlying system call to do brew ... 2>&1.

from puppet-homebrew.

jordigg avatar jordigg commented on August 23, 2024

Yes we already do this but want to check if the output is like other errors or in this case brew is separating them for some reason. If that's the case will need to check with them and see if can be corrected in case is a "bug". I would expect to get all error messages via the same source.

Because they don't have other exit codes to point to specific errors we have to parse text which is not ideal. Would be nice to get exit code 5 or whatever and know that in this case we have a mismatch between the downloaded file and the source and we need to download again.

Better yet on this specific case, if brew knows there's a mismatch they should handle file deletion and re-try the download themselves without user interaction. I don't understand why they don't fix the problem instead of asking the user to do it manually.

from puppet-homebrew.

TheKevJames avatar TheKevJames commented on August 23, 2024

@jordigg I think this is related to the recent change to parsing return values rather than output parsing. Now that failonfail is set here, the line below probably doesn't run on a SHA failure and so the fix_checksum method never gets called. We might be able to move this case to the rescue (if we can still identify sha errors vs other errors in that block).

It would be great to get a test case for this, also, but this seems difficult to replicate in a programmatic fashion. Any thoughts on this? We might be able to create a purposely corrupt version of some package's tarball and attempt to install over it.

from puppet-homebrew.

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.