GithubHelp home page GithubHelp logo

Comments (4)

Bo98 avatar Bo98 commented on June 12, 2024 1

The order in a cask file is ignored. There is a specific order defined:

https://github.com/Homebrew/brew/blob/1fac68348a61f735066ba58e6ba35d2cec8bdf8c/Library/Homebrew/cask/artifact/abstract_artifact.rb#L60-L92

When you have two DSLs with the same type, the order is currently undefined - it's not a stable sort and can execute in either order, API or not. We would need to sort by index as a second condition for that to be stable.

from homebrew-cask.

bevanjkay avatar bevanjkay commented on June 12, 2024

Thanks @jbfavre for the report, it's definitely a bug in Brew from what I can see.


@Bo98 Are you able to help here?

I think I've found the issue, but I can't work out the solution.

https://github.com/Homebrew/brew/blob/9b995947532ac067c3361cfa39e6a9d10491c77f/Library/Homebrew/cask/artifact_set.rb#L19
The ArtifactSet.new class seems to be re-ordering the installer script stanzas when yandex-cloud-cli is loaded from the API. The second stanza is being fired first, causing the install to fail. They should fire in the same order as the caskfile, which they do when loaded from the ruby version.

https://github.com/Homebrew/homebrew-cask/blob/master/Casks/y/yandex-cloud-cli.rb#L18-L25

from homebrew-cask.

Bo98 avatar Bo98 commented on June 12, 2024

Looking at install.sh, a hack that might work is -r /dev/null rather than -n as it seems that RC file modification also calls yc components post-update.

from homebrew-cask.

jbfavre avatar jbfavre commented on June 12, 2024

@Bo98 Thanks for sharing your idea.
I tested it and, as far as I can tell: it works!
I'll open a PR to propose the fix

from homebrew-cask.

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.