Comments (7)
...
Edited note to self: the disgusting 30-minute solution is just to modify the offending logic to check for.gitignore
,.gitkeep
, and.gitattributes
files, I guess. That will buy some time to work out a more proper solution.
FYI: might want to add .gitmodules
as well ;) (from git submodules)
from cheat.
Ah, damn. I can confirm this behavior. As you've pointed out, this is surely due to some of the changes implemented on Friday.
Thanks for the very thorough bug report. I'll see if I can scrape together some time to fix this tomorrow.
from cheat.
Note to self: it's obvious now that attempting to base this logic off of string parsing is the path to ruin. I need to re-implement all of this using go-git
.
Edited note to self: the disgusting 30-minute solution is just to modify the offending logic to check for .gitignore
, .gitkeep
, and .gitattributes
files, I guess. That will buy some time to work out a more proper solution.
from cheat.
@sevens, please try the 4.3.3
release, which was published moments ago:
https://github.com/cheat/cheat/releases/tag/4.3.3
I believe this should solve the problem.
I'm going to optimistically close this ticket as resolved, but feel free to re-open if necessary.
Thanks!
from cheat.
Thanks for the quick fix! I've tested it on 2 machines and the fix works for me.
FWIW: I just realized that .git
can also be a plain file in case of a worktree checkout, just to keep things simple I gues... I just did a quick test with this, using the community cheatsheets repository, and this doesn't give an error. However, .git
(and .github/*
) do appear in the cheat -l
output, no idea if either of them did before 4.3.3. Output:
$ CHEAT_CONFIG_PATH=./conf.yml cheat -l | head -5
title: file: tags:
.git cheatsheets-wt/.git test
.github/LICENSE.txt cheatsheets-wt/.github/LICENSE.txt test
.github/README.md cheatsheets-wt/.github/README.md test
7z cheatsheets-wt/7z compression,test
Edit: this isn't an actual problem for me as I'm not using it in this way (well, I am using a git worktree for cheatsheets but the .git
file is outside of the cheatpath).
from cheat.
@sevens, thanks for following up.
Ah, geez. That's annoying. This has been shockingly hard to get right. There's a huge amount of nuance to all of this that I didn't anticipate.
At least we aren't crashing anymore, though.
With the last release, I made an invisible but important change: when the installer runs, git
operations (the cloning) are now performed by go-git
, rather than a shell call to git
on the PATH
.
Now that go-git
is in the project, I can refactor all of this problematic code to determine where we are using git
operations rather than string parsing, because the string parsing approach seems fraught with peril.
Time permitting, I'll take a crack at that next weekend. In the meantime, at least we aren't crashing.
Thanks for the help 🙂
from cheat.
Yeah, using a library is probably much safer (and future-proof, e.g. the whole worktree stuff is fairly new AFAIK, and still somewhat experimental). Good luck with refactoring.
You're welcome, and thanks for making cheat
in the first place; I find it very useful and use it daily!
from cheat.
Related Issues (20)
- New cmd implementation in minimal POSIX sh? HOT 1
- Colorized output and search shows ANSI Escape Sequences HOT 13
- Version 4.2.7 broke personal cheatsheets in custom location HOT 11
- Git submodules as cheatsheet paths don't work any more HOT 6
- Autocompletion Not working HOT 3
- frontmatter error HOT 20
- Cheat fails to show when the filepath contains directories that end in ".git"
- Cheat files tagged personal going into unexpected folder HOT 3
- safer installer? HOT 1
- feat: add cheatsheet for Vite. HOT 1
- Failed to parse front-matter HOT 4
- failed to write to pager: exec: "PAGER_PATH": executable file not found in $PATH HOT 7
- yaml unmarshal error :: Cannot unmarshal !!str `tags [ ...` into sheet.frontmatter HOT 2
- lstat /home/foo/.config/cheat/cheatsheets: no such file or directory HOT 1
- Magic SysRq REISUB HOT 1
- Update chroma dependency HOT 1
- yaml unmarshal error :: Cannot unmarshal !!str tags [ ... into sheet.frontmatter HOT 1
- Config option to exclude files
- Consider building with `CGO_ENABLED=0` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cheat.