Crash when counting commits in multiple repos
See original GitHub issueNode Version: v7.2.1
tiny-core-terminal version: 1.0.8
Shell: bash
Terminal Program: iTerm2
Operating System: macOS
I have quite a few repos in ~/dev
. The dashboard starts up, starts counting commits for a second and then crashes. Using TTC_REPOS=/single/repo
works fine for the ones I tried. Didn’t try very hard to debug into the blessed library since I don’t know what the code is doing. What I can tell you that at that given code location in blessed (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2543
), we have part == "cpp"
and val == "cpp"
.
Unsetting env vars other than TTC_REPOS doesn’t make a difference.
$ set | grep TTC
TTC_APIKEYS=false
TTC_BOTS=tinycarebot,selfcare_bot
TTC_REPOS='~/dev'
TTC_WEATHER=Munich
$ tiny-care-terminal
TypeError: Cannot read property 'slice' of null
at /usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2543:35
at Array.forEach (native)
at Program._attr (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/program.js:2542:11)
at Box.Element._parseTags (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:498:26)
at Box.Element.parseContent (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:393:22)
at Box.Element.render (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/element.js:1839:8)
at /usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:738:8
at Array.forEach (native)
at Screen.render (/usr/local/lib/node_modules/tiny-care-terminal/node_modules/blessed/lib/widgets/screen.js:735:17)
at Socket.week.stdout.on.data (/usr/local/lib/node_modules/tiny-care-terminal/care.js:120:12)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:551:20)
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Recover git from a crash - Stack Overflow
"Dangling" commits are normal even in a healthy repository: they are the tip of a set of unreachable commits, and generally arise from ......
Read more >Mainnet Geth crashes in panic `Refund counter below zero ...
Yes, I am hitting with too many requests on geth. And this I have been doing for past two years, and have never...
Read more >git-bisect Documentation - Git
This command uses a binary search algorithm to find which commit in your project's history introduced a bug. You use it by first...
Read more >git ready » count your commits
The -s option squashes all of the commit messages into the number of commits, and the -n option sorts the list by number...
Read more >How To Get Total Git Commit Count + Total Git ... - YouTube
How To Get Total Git Commit Count + Total Git Commits Per Author BEST HOST + FREE DOMAIN +...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same problem, and traced it to curly braces in the commit messages wreaking havoc with the “tag parser” implemented in the blessed library. The simplest fix is to set
tags: false
inmakeBox()
, but I’m not sure if there is an unrelated reason it needs to be set totrue
. The alternative is to do something likecontent = content.replace(/[{}]/g, m => m === '{' ? '{open}' : '{close}');
insidegetCommits()
. Happy to submit a tiny-PR if you let me know which solution you think would be more appropriate 😃I won’t find the time in the near future to work on this issue. Maybe somebody can create a pull-request? It shouldn’t be that hard. 🤞