Code Monkey home page Code Monkey logo

Comments (13)

kevva avatar kevva commented on May 30, 2024

Maybe use this callback? https://github.com/kevva/bin-wrapper/blob/master/bin-wrapper.js#L91.

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

Hmm, is that the only way it can fail? I basically want it shown on all failures.

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

This is basically the last resort. There's another callback on .check() to see if a current/downloaded binary works or not. Don't think there's a lot more places it can fail.

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

Ok, since 5d0f504 every error is emitted through the error event.

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

@kevva but do we handle it and print out helpful instructions? otherwise this isn't really fixed.

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

Should be handled on the error and fail events by the packages using this imo.

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

opened tickets ;)

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

what's the difference between fail and error?

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

It will emit fail when it can't find a precompiled binary or if the precompiled binary exits with !== 0 code.

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

But why the differentiation?

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

Because you don't want to run build after all errors, just when the check fails. The build method emits error itself when it fails which would cause a loop.

Mostly, build will only run on fail.

from bin-wrapper.

sindresorhus avatar sindresorhus commented on May 30, 2024

@kevva maybe clarify that in the readme? the events aren't even documented except for in the example.

from bin-wrapper.

kevva avatar kevva commented on May 30, 2024

Sure, I need to finish up on the addUrl method first so that everything works.

from bin-wrapper.

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.