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

Check config format, add a useful message #87

Open
Marwe opened this issue Jul 10, 2018 · 1 comment
Open

Check config format, add a useful message #87

Marwe opened this issue Jul 10, 2018 · 1 comment

Comments

@Marwe
Copy link

Marwe commented Jul 10, 2018

I messed up my ~/.grconfig.json (excess comma at end of a list due to deletion of last entry) and found the resulting error message to be not exactly informative.
Maybe this can be handled better, such that a (syntax) check is included and a useful "config messed up"-message can be shown.

gr git status
/usr/lib/node_modules/git-run/lib/command-requirements.js:8
    if (gitCommand.stderr.toString().replace(/(\r\n|\n|\r)/gm, '').trim()) {
                         ^

TypeError: Cannot read property 'toString' of null
    at Object.git (/usr/lib/node_modules/git-run/lib/command-requirements.js:8:26)
    at Object.module.exports [as handle] (/usr/lib/node_modules/git-run/plugins/run.js:29:38)
    at next (/usr/lib/node_modules/git-run/index.js:244:11)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)
    at next (/usr/lib/node_modules/git-run/index.js:227:14)

Thanks for this great piece of software!

@roytruelove
Copy link

My guess is that this isn't handled super elegantly because it's not expected that the users will be editing that file directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants