Coder Social home page Coder Social logo

Comments (8)

thomasaarholt avatar thomasaarholt commented on June 4, 2024 2

Ooh, that's an exciting package that I was totally unaware of! Thanks!

from bashly.

DannyBen avatar DannyBen commented on June 4, 2024 1

The generated scripts require bash 4 as stated in the prerequisites section of the documentation.

Changing the shebang to zsh is not a good idea as it will just require double effort in testing, and will force the generated script to use the lowest common demonimator. You can still run bash scripts in zsh (or any other) shell, as long as a modern bash is installed.

Bash 4.0 was released in 2009 - the complaint should be directed to Apple for bundling a 12 year old software.

I can add the instruction for brew install bash in the prerequisites section - will that be acceptable as a hint? In addition, if you know your users are mostly on mac with outdated bash, you can customize this error by adding the following file to your src folder:

# src/bashly-strings.yml
unsupported_bash_version: "bash version 4 or higher is required (brew install bash on mac)"

See Custom Strings in the docs for more info.

Also, the graceful exit when bash is < 4 was recently added by a user request (#90).

but updating bash can be viewed as invasive by sysadmin.

... there is really no reason to keep an old bash in the system. Apple uses it just due to some licensing wars to my understanding. I don't believe in "staying behind" just because the manufacturer has a different agenda than user happiness (e.g. Internet Explorer 11...).

from bashly.

thomasaarholt avatar thomasaarholt commented on June 4, 2024 1

Happy to help :) sorry if my "solutions" came across as a bit "not-thought-through" - I was just trying to think of ideas.
Very excited to use the bashly script that we've created! :)

from bashly.

DannyBen avatar DannyBen commented on June 4, 2024 1

sorry if my "solutions" came across as a bit "not-thought-through"

Are you kidding? It is very appreciated that you took the time to look for solutions and not just point out a problem.

In fact, I feel like I should be the one to apologize for not having this requirement (and solution) more clearly on the documentation site - so let's meet in the middle, and nobody apologizes to nobody! :)

Very excited to use the bashly script that we've created! :)

Happy to hear!
There are quite a few "hidden features" that can be found in the documentations and examples, and also note that the generated script is by design, very human readable.

from bashly.

thomasaarholt avatar thomasaarholt commented on June 4, 2024

Nice! Thanks for the suggestion on the .yml, we'll do that!
The graceful exit makes total sense :)

I agree with blaming Apple for all this nonsense!

from bashly.

DannyBen avatar DannyBen commented on June 4, 2024

Cool.

I will update the docs, and if more users land on this issue and think that changing the default error message to include instructions to brew install bash is a good idea, please comment here and I will add it if there is demand.

Thanks for your report, and If something else is unclear or not working as expected, feel free to open a new issue.

from bashly.

thomasaarholt avatar thomasaarholt commented on June 4, 2024

Sounds great 😄 Thanks for your help!

from bashly.

DannyBen avatar DannyBen commented on June 4, 2024

Oh - and one last tip:

If you are serious about your bash scripts, and the quality of your code, you should use shellcheck to verify the output.

All code generated by bashly itself, is shellcheck compliant.

EDIT: I have added more details about Testing Your Scripts to the docs.

from bashly.

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.