Giter Site home page Giter Site logo

Failure to detect bz2 about ruby-build HOT 6 CLOSED

konsolebox avatar konsolebox commented on July 30, 2024
Failure to detect bz2

from ruby-build.

Comments (6)

konsolebox avatar konsolebox commented on July 30, 2024 1

Thanks for reporting! I'm all for accepting a PR switching to [[ str != pattern ]] if bash 5.3 is already widely distributed and if it will take a while for the patch to roll out to package managers. But it's good to know this has been fixed.

Well Bash 5.3 is still in alpha stage so you don't have to worry. It's basically a use at your own risk version. In Gentoo for example, it doesn't even have a keyword. I OTOH prefer to install it (and sometimes the devel branch version) so I can find issues like this.

from ruby-build.

mislav avatar mislav commented on July 30, 2024

Everything after # gets stripped from package_url a few lines above the line you've linked:

ruby-build/bin/ruby-build

Lines 468 to 470 in 0aefaa4

if [ "$package_url" != "${package_url/\#}" ]; then
checksum="${package_url#*#}"
package_url="${package_url%%#*}"

from ruby-build.

konsolebox avatar konsolebox commented on July 30, 2024

Seems like this no longer works in Bash 5.3: ${package_url/\#}

from ruby-build.

konsolebox avatar konsolebox commented on July 30, 2024

I sent a bug report to bug-bash but maybe these issues can be avoided by using [[ $str != pattern ]]. There's no reason to make it POSIX compatible.

from ruby-build.

konsolebox avatar konsolebox commented on July 30, 2024

Bash devel branch has fixed the issue and I just tested ruby-build works again so I'm closing this now, thanks.

from ruby-build.

mislav avatar mislav commented on July 30, 2024

Thanks for reporting! I'm all for accepting a PR switching to [[ str != pattern ]] if bash 5.3 is already widely distributed and if it will take a while for the patch to roll out to package managers. But it's good to know this has been fixed.

Semi-related: something that I found out (in a different repo) the hard way is that newer versions of bash expand the ~ as a pathname in the expression ${str/pattern/~}, while bash 3.2 interprets it as a literal. For newer versions of bash, the solution is to backslash-escape the ~ sign, but in bash 3.2 the replacement would result in a literal \~. I couldn't find a way to make it work across bash versions, so I just rewrote the expression using different string replacement methods.

from ruby-build.

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.