Code Monkey home page Code Monkey logo

bashvm's People

Contributors

ueokande avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bashvm's Issues

Perils of `rm -fr $builddir`

Thanks for this. I was recently lamenting the lack of anything like this tool.

rm -rf $builddir

This is dangerous.

  1. Since $builddir isn't quoted, chaos will ensue if this ever becomes subject to word splitting for any reason. C.f.: bumblebeee
  2. since you don't have set -u, who knows what will happen if the variable is unset when we get to this point? C.f.: steam-for-linux and shellcheck (I'm not really recommending set -u btw)
  3. Globs and wildcards in the path will be expanded by the shell before rm is called, leading to some kind of apocalypse probably.

You may think that the code as-written can't be subject to such problems. But a future refactoring elsewhere could render this unsafe.

If you agree I can send a PR adding some safety catches. What do you think?

curl: (78) RETR response: 550

It works fine locally, but an error occurs when running it from GitHub Actions:

$ git clone https://github.com/ueokande/bashvm $HOME/.bashvm
$ source $HOME/.bashvm/bin/bashvm-init
$ bashvm use --install 5
Fetching bash-5...
#=#=#                                                                         
##O#- #                                                                       
##O=#  #                                                                      
#=#=-#  #                                                                     
-#O#- #   #                                                                   
curl: (78) RETR response: 550

BASH_VERSION is wrong somehow

$ bashvm use 4.0 --install
$ echo $BASH_VERSION
5.1.4(1)-release
$ LANG=C bash --version|sed -nr '1s/^.*, version (.*) .*/\1/p'
4.0.0(1)-release

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.