Code Monkey home page Code Monkey logo

Comments (5)

msteen avatar msteen commented on August 28, 2024 1

I am not familiar with MacOS. The first case should be fixed in the latest release. The other two errors are strange to me, as it concerns this line: [[ $input_type =~ ^(|nix|json|shell)$ ]] || die "Unsupported input type '${input_type}'."
As both values '' or 'nix' should and do match that regex on Linux.

Is MacOS using a different bash than Linux that does not support these regexes?

from nix-prefetch.

siraben avatar siraben commented on August 28, 2024

Still relevant to me

from nix-prefetch.

kalekseev avatar kalekseev commented on August 28, 2024

Is MacOS using a different bash than Linux that does not support these regexes?

@msteen the regex ^(|nix|json|shell)$ is not posix compliant, | can't follow ( or another | or precede ) so it's not possible to match empty string https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_03:
A <vertical-line> appearing first or last in an ERE, or immediately following a <vertical-line> or a <left-parenthesis>, or immediately preceding a <right-parenthesis>, produces undefined results.

from nix-prefetch.

antifuchs avatar antifuchs commented on August 28, 2024

I'm hitting this on the 0.4.0 release as well - it feels weird that the main.sh script uses a bash from the nix store (/nix/store/30njb8l701pwnm5ya749fh2cgyc2d70m-bash-4.4-p23/bin/bash) on linux as well as on macOS - and only on macOS, it fails.

Anyway, I guess fixing those regexes might be the way forward for this issue.

from nix-prefetch.

antifuchs avatar antifuchs commented on August 28, 2024

With #24, I can use nix-prefetch on macOS again; would appreciate if other people could test!

from nix-prefetch.

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.