Skip to content
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

Getting Started issues #26855

Open
ericfrederich opened this issue Nov 13, 2024 · 4 comments · May be fixed by denoland/deno_install#314
Open

Getting Started issues #26855

ericfrederich opened this issue Nov 13, 2024 · 4 comments · May be fixed by denoland/deno_install#314

Comments

@ericfrederich
Copy link

ericfrederich commented Nov 13, 2024

Version: Deno 2.0.6
OS: Ubuntu 24.04 via WSL2

Couple of issues I noticed simply running curl -fsSL https://deno.land/install.sh | sh as instructed in the Getting Started page

  • It appends . "/home/username/.deno/env" to my ~/.bashrc and ~/.profile but does not add a trailing newline. Obviously a bug because it means subsequent scripts that want to do the same thing would end up appending to that line.
  • After selecting bash when asked "Set up completions?" I get the message: warning: Failed to install completions for bash: PermissionDenied: Permission denied (os error 13): mkdir '/usr/local/etc/bash_completion.d'. The docs do not mention the need to run this as root. Perhaps those files should be installed in the user's directory and not globally.
@uncomfyhalomacro
Copy link
Contributor

Hi @ericfrederich. I think this could be fixed easily by just adjusting their install script. I also filed a duplicate issue at #26824

@uncomfyhalomacro
Copy link
Contributor

I will close mine in favour of this since it also seems it has another issue written here.

@ericfrederich
Copy link
Author

Thanks @uncomfyhalomacro. Perhaps it should be discussed the proper place on Linux to put these. This isn't my area of expertise to say that it should be in ~/.local/share/bash-completion/completions.

When I look at my system I actually don't have an existing ~/.local/share/bash-completion directory. I do however have some completion files in app specific directories.

  • /home/username/.pyenv/completions/pyenv.bash
  • /home/username/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/etc/bash_completion.d/cargo
  • /home/username/.nvm/bash_completion

Perhaps the completions should be put in the user's directory under ~/.deno. This seems to be the pattern other tools are using (whether right or wrong).

@uncomfyhalomacro
Copy link
Contributor

uncomfyhalomacro commented Nov 13, 2024

I don't remember bash reading those directories (i also think it requires an environmental variable). i do believe that the proposal i have is where bash usually looks for completions

  • /usr/share/bash-completion/completions
  • /usr/local/share/bash-completion/completion
  • /etc/bash_completion.d
  • /usr/local/etc/bash_completion.d
  • ~/.local/share/bash-completion/completions

i might be wrong so it still requires discussion.

i think just putting them in "standard" bash completion directories should be okay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants