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

Save stats when stats file is empty #12

Open
btror opened this issue Nov 11, 2024 · 0 comments
Open

Save stats when stats file is empty #12

btror opened this issue Nov 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@btror
Copy link
Owner

btror commented Nov 11, 2024

when the stats file is completely empty and you do a test the results are not saved and you get this:

raijq: error: syntax error, unexpected '[', expecting FORMAT or QQSTRING_START (Unix shell quoting issues?) at , line 3:
.average.["tests taken"] += 1 | jq: error: syntax error, unexpected ')', expecting $end (Unix shell quoting issues?) at , line 4:
.average.wpm = ((.average.wpm * (.average.["test taken"] - 1) + $new_wpm) / .average.["tests taken"]) |
jq: 2 compile errors
mkdir: : No such file or directory

temporary solution is to add empty {} brackets in stats.json to start with

@btror btror added the bug Something isn't working label Nov 11, 2024
@btror btror self-assigned this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant