You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It isn't currently possible to use the Snap package with the standard conf.yml file location:
$ export CHEAT_CONFIG_PATH=~/.config/cheat/conf.yml
$ cheat init
failed to load config: could not read config file: open /home/finchd/.config/cheat/conf.yml: permission denied
This is a security feature of snaps, that they can't access the user homedir.
Instead the config (and community cheatsheets) are installed to: ~/snap/cheat/common/.config/cheat/conf.yml
Which is difficult to find later, difficult to include in a dotfiles repo, etc
Describe the solution you'd like
Similar to lucagrulla/cw, use a Snap Interface. With cw, you can run sudo snap connect cw-sh:dot-aws-config-credentials after installing the snap, to give it access to ~/.aws/credentials for each snap user.
A Snap Interface for cheat could be called 'dot-cheat-config' and give the package access to reach ~/.config/cheat/* to store cheatsheets and the conf.yml in.
Describe alternatives you've considered
Running cheat init without exporting CHEAT_CONFIG_PATH and letting it write to ~/snap/cheat/ works, and does echo out the location of the new conf.yml so the user can find the config the first time.
This isn't a major showstopper by any means, but seems like a reasonable packaging addition.
Hi @finchd,
thanks for reporting - this is correct, but with the personal-files Interface the user is required to connect to that interface manually before initializing cheat the first time.
I could add this as a separate option, so it is possible to use dotfiles in the home directory, but to make this the default is in my opinion conflicting with users which only want to see cheatsheets.
I will think on how to include this option and let you know :)
Is your feature request related to a problem? Please describe.
It isn't currently possible to use the Snap package with the standard conf.yml file location:
This is a security feature of snaps, that they can't access the user homedir.
Instead the config (and community cheatsheets) are installed to:
~/snap/cheat/common/.config/cheat/conf.yml
Which is difficult to find later, difficult to include in a dotfiles repo, etc
Describe the solution you'd like
Similar to lucagrulla/cw, use a Snap Interface. With
cw
, you can runsudo snap connect cw-sh:dot-aws-config-credentials
after installing the snap, to give it access to ~/.aws/credentials for each snap user.A Snap Interface for
cheat
could be called 'dot-cheat-config' and give the package access to reach~/.config/cheat/*
to store cheatsheets and the conf.yml in.Describe alternatives you've considered
Running
cheat init
without exporting CHEAT_CONFIG_PATH and letting it write to ~/snap/cheat/ works, and does echo out the location of the new conf.yml so the user can find the config the first time.This isn't a major showstopper by any means, but seems like a reasonable packaging addition.
Additional context
Version Info:
The text was updated successfully, but these errors were encountered: