-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.bashrc
lines should be added by default in the install one-liner
#286
Comments
Additionally also environment variables ( |
Unfortunately I don't think that part is possible (though I could be wrong), so there should instead be a clear instruction like in Bun/Rust/etc. |
+1 |
@mmastrac Any chance this could could be fixed for v2.0? |
PRs welcome. |
Historically we keep rejecting this suggestion. ref #52 #157 #177 #178 #231 #268 One reason is that proper shell detection is more difficult in *nix system (there are many shells and they use different profile paths) than on windows. Another reason is that we'd like to keep the script easily understandable & auditable by the users. |
I'm not sure I'll say anything to convince you here that you haven't already heard, assuming you read at least the bold parts of my original post, but: Deno install experience could be delightful, and other projects realise how important this is, and are willing to trade away (legitimately important) things for that (like install script simplicity, as you say). MacOS+Windows+Ubuntu would be enough. No need to dump *nix burdens on newbies - just add one new flag, and add that to the default install command on the install docs page. Or add even add a dropdown to select OS. Or almost literally anything other than making people manually add stuff to their bashrc. Newbies will suffer less, can't save souls in an empty church, etc. If you are unmoved, please feel free to close this issue - painful, but no hard feelings. |
Bun, for example, does the detection of bash, zsh, fish, and it takes ~116 lines for it https://github.com/oven-sh/bun/blob/ba5dd63eb6d2855fd814fbc92589f796b5b8adf5/src/cli/install.sh#L179-L295, which is almost double of our current install.sh (60 lines). I'm not sure it's worth it @ry Do you still feel strongly about this policy? |
+1 on adding those by default. This removes a point of friction for new users. We should do this and the benefits for new users far outweighs concerns over lines of code of the install script to me. |
TL;DR: Rust, Bun, and many other tools add
.bashrc
lines automatically, and this makes it a lot easier to quickly get up and running with a tool, especially for newbies. I really think Deno should add.bashrc
lines automatically.Each time I have to install Deno on a new machine (not often), I'm re-surprised that a one-liner install is made into a multi-step, newbie-confusing process. It's not that it's hard/annoying for me, because I very rarely have to do it and I'm an experienced dev, but I'm just surprised that this very obvious friction is sitting there, year after year.
I find it hard to believe that the team hasn't considered reducing the friction by the install experience one-step, so I'm (wildly) guessing someone on the team has a kind of ~ideological/"correctness"/theoretical position against it or something, but, again, I'm wildly guessing here and could be completely off-base on that assumption.
I guess another possibility here is that the team has a kind of "curse of knowledge", and so doesn't actually perceive this as friction for newer devs. I've tutored in coding so it's painful for me to see such plain and fixable friction, knowing how hard it can be for newer devs to deal with "simple" stuff like this, especially when the full instruction given to them is just this blob of unformatted/unspaced text:
Added "~/.deno" to $PATH in "~/.bashrc"
in the install logs and remove it if they want to, and they can then go to the docs and find the flag to add to the one-liner which disables auto-adding to bashrc for future installs.I installed Bun just now, and they add it automatically. Rust does too. Also, another thing to take inspiration from Bun is the formatting of the install text:
(Deno's kinda makes my eyes defocus. But that's just an aside - not super important.)
Please, for the benefit of newbies and the growth of Deno, add the bashrc lines automatically 🙏
Thank you for coming to my ted talk.
The text was updated successfully, but these errors were encountered: