cheat / cheat

cheat allows you to create and view interactive cheatsheets on the command-line. It was designed to help remind *nix system administrators of options for commands that they use frequently, but not frequently enough to remember.
MIT License
12.41k stars 823 forks source link

lstat /home/foo/.config/cheat/cheatsheets: no such file or directory #730

Open guettli opened 1 year ago

guettli commented 1 year ago

Thanks for submitting a bug report. Please provide the following information:

A description of the problem

Here is what I did:

❯ go install github.com/cheat/cheat/cmd/cheat@latest
go: downloading github.com/cheat/cheat v0.0.0-20221105171122-0d9c92c8c0f9
...

❯ cheat
A config file was not found. Would you like to create one now? [Y/n]: y
Would you like to download the community cheatsheets? [Y/n]: n
Created config file: /home/guettli/.config/cheat/conf.yml
Please read this file for advanced configuration information.

❯ cheat -e foo
failed to load config: failed to resolve symlink: /home/foo/.config/cheat/cheatsheets/community: lstat /home/guettli/.config/cheat/cheatsheets: no such file or directory
chrisallenlane commented 11 months ago

Ah, geez. This is a really stupid behavior that I overlooked. Thanks for the bug report. I'll see what I can do about it.

anarqist commented 1 month ago

Hi, I am facing the same issue:

I installed cheat with brew install cheat.

Then I run cheat --help and it suggested this command

Examples:

  To initialize a config file:
    mkdir -p ~/.config/cheat && cheat --init > ~/.config/cheat/conf.yml

I have done this as well. Then I just tried to see if there are already some lists and I ran cheat -land I got this error message: failed to load config: failed to resolve symlink: ~/.config/cheat/cheatsheets/community: lstat ~/.config/cheat/cheatsheets: no such file or directory

I then ran git clone https://github.com/cheat/cheatsheets.git inside ~/.config/cheat

cheat -loutputs failed to load config: failed to resolve symlink: ~/.config/cheat/cheatsheets/community: lstat ~/.config/cheat/cheatsheets/community: no such file or directory I manually created the folder community. cheat -loutputs failed to load config: failed to resolve symlink: ~/.config/cheat/cheatsheets/personal: lstat ~/.config/cheat/cheatsheets/personal: no such file or directory I manually created the folder personal.

Now there is no longer any error message with cheat -lso I tried to add a new entry: cheat -e finderwhich outputs failed to edit cheatsheet: exec: "EDITOR_PATH": executable file not found in $PATH

I am running macOS 15.0.1.