3 ms·
Any software you choose to run could not respect your desires and leave a mess. This is not a random shell script. It's the officially recommended way to instal
by __ryan__ 4y ago
Any software you choose to run could not respect your desires and leave a mess. This is not a random shell script. It's the officially recommended way to install Rust [0], vetted and maintained by the community. You're free to audit the script before running it, or even check out the source [1]. If this doesn't satisfy you, check out the other installation methods [2].
Edit: I realize you're not speaking specifically about rustup, but what I said can and should apply to anything you choose to install this way.
0: https://www.rust-lang.org/tools/install#rustup https://www.rust-lang.org/tools/install#rustup
1: https://github.com/rust-lang/rustup https://github.com/rust-lang/rustup
2: https://forge.rust-lang.org/infra/other-installation-methods.html https://forge.rust-lang.org/infra/other-installation-methods...
- marcosdumay 4y ago> Any software you choose to run could not respect your desires and leave a mess. On most languages, you must decide to do it to create a mess. Bash is almost alone on the place where you can do it by accident.
- maccard 4y agoA syntax error in any scripting language will have the exact same problem.
- woojoo666 4y agoIt's arguably easier to fall into such errors in Bash though. That's just my experience at least
- marcosdumay 4y agoProblems like removing a large directory instead of a file, creating your files on random places instead of the directory you pass on, or creating more files than you intended? The one mess you see from other languages is creating files on the wrong place (or all over the place). But not those above.
- maccard 4y ago> Problems like removing a large directory instead of a file rm doens't do that unless you explicitly tell it to. > Problems like removing a large directory instead of a file, creating your files on random places instead of the directory you pass on, or creating more files than you intended? But yes, all of these can and do exist in other languages. Using python as an example, if you read an environment variable without checking it's set (as in the infamous steam bug) [0], you'll end up with pretty much the exact same behaviour. You can misindent your loop in python and not create/remove files that you intend to, or your script can have a syntax error halfway through and the interpreter will happily proceed until it halts, and leave you in a half baked state just like bash does. [0] https://github.com/valvesoftware/steam-for-linux/issues/3671 https://github.com/valvesoftware/steam-for-linux/issues/3671
- __ryan__ 4y agoAny tool can be dangerous in inexperienced or careless hands. The issues you described could just as likely be caused by logic errors or typos in any other language. You’re talking as if all bash scripts are hacked together carelessly and work by accident. You can actually learn bash. Thankfully the script we’re discussing is written with care and vetted by the community. Problems like removing a large directory instead of a file The rm command doesn’t even remove directories by default, you have to specify a flag. Not knowing a tool is not a good reason to bash it.
- marcosdumay 4y agoIsn't Rust one of those languages based on the idea that tools matter and that should either be correct or obviously wrong? (And no, those problems do usually not appear due to logic errors or typos in other languages. It's very, very rare.) I'm well aware that the Rust installation script is well vetted and stable enough to be reliable. Bootstraping a development environment is also a real problem, with no good answers. It's understandable that they want to bootstrap from Bash. But as understandable as it is, it still carries the Bash issues with it. Of course, the optimum solution would be to do it from your system's tools. That is something that will probably happen naturally given enough time.