Cypress 1.0.1 on Linux
When @jennifer-shehane changed her GitHub email, Cypress run started crashing trying to parse the commit author line (in several projects).
Opening Cypress...
TypeError: Cannot read property '0' of null
at Function.module.exports.Commit.actor (/root/cypress-dashboard/node_modules/cypress/dist/Cypress/resources/app/packages/server/node_modules/gift/lib/commit.js:176:56)
at Function.module.exports.Commit.parse_commits (/root/cypress-dashboard/node_modules/cypress/dist/Cypress/resources/app/packages/server/node_modules/gift/lib/commit.js:139:21)
at /root/cypress-dashboard/node_modules/cypress/dist/Cypress/resources/app/packages/server/node_modules/gift/lib/commit.js:99:39
at ChildProcess.exithandler (child_process.js:209:7)
The crash happens inside gift package at line that tries to parse author line
ref1 = this.actor(author_line), author = ref1[0], authored_date = ref1[1];
We need to handle the crash.
Oh good find. Is the problem inside of gift? Are there updates available? Would you prefer to switch to a different git lib?
gift v0.10.0 has same problems, seems it is getting confused parsing the following commit message
commit 2a4d33f2104429f9709a54c6a88f0c7b13d10fee
tree dcbaa9b08b5ebba0b83b0221f9411643b45d549e
parent a805a981f953b1db98fd7025743c48491e59ba3d
author Jennifer Shehane <[email protected]> 1509134693 -0400
committer GitHub <[email protected]> 1509134693 -0400
gpgsig -----BEGIN PGP SIGNATURE-----
wsBcBAABC...
=GKAb
-----END PGP SIGNATURE-----
update description in README
And does not fail when parsing commit without pgp signature?
commit 3612e16e15f55b4df27fc739b1c88d46c30a8e4f
tree 4addedb156df7034503ef2c5cf68b837f39a8d0c
parent 0aa2fa2092e8d5701bbbdc18ebc109bac66755e4
parent d78945a76910481c7015ea6d3d57fa6d10b94a65
author Brian Mann <[email protected]> 1492208896 -0400
committer GitHub <[email protected]> 1492208896 -0400
Merge pull request #8 from cypress-io/CYP-838-new-tree-traversal-commands
Added examples for newly added traversal commands.
Seems gift does not account for extra space line after PGP signature. For example lines with PGP signature have extra ' ' line between signature and message.
read PGP signature
[ '-----BEGIN PGP SIGNATURE-----',
' ',
' wsBcBA...
' =GKAb',
' -----END PGP SIGNATURE-----' ]
after reading PGP sign lines
[ ' ', '', ' update description in README', '', '' ]
after reading message
[]
Notice that after reading signature the text lines are still , `, update ...`
and reading message fails.
work around for now - disable PGP signature :(
Can confirm, version 1.0.3 fixed the issue. Thanks for fast reaction 馃憤
Fixed in 1.0.3.