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

Why do I need sudo to install grammars? #2091

Closed
maxtremblay opened this issue Apr 13, 2022 · 1 comment
Closed

Why do I need sudo to install grammars? #2091

maxtremblay opened this issue Apr 13, 2022 · 1 comment
Labels
C-bug Category: This is a bug

Comments

@maxtremblay
Copy link

Summary

When I run hx --grammar fetch, I get an error related to permission. I can do it with sudo, but this seems a bit weird to me. At least, it is not documented.

Reproduction Steps

I tried this:

  1. hx --grammar fetch

I expected this to happen:

Successfully fetching all grammar sources.

Instead, this happened:

...

Error: Failed to fetch some grammar(s)

Caused by:
    0: Could not create grammar directory "/usr/share/helix/runtime/grammars/sources/rust"
    1: Permission denied (os error 13)

Note that the last value in the path, rust in the example, is arbitrary, and I get other languages depending on which one fail first.

Helix log

The log file is empty.

Platform

Fedora 35

Terminal Emulator

alacritty 0.10.1

Helix Version

helix 22.03 (d4e45fd)

@maxtremblay maxtremblay added the C-bug Category: This is a bug label Apr 13, 2022
@archseer
Copy link
Member

You shouldn't need to sudo (and I don't recommend it), but in this case your package is installed into /usr/share so we're not able to upgrade those grammars. I guess there needs to be some notion of "system" runtime provided by the package vs user runtime in ~/.config/helix/runtim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

3 participants