Nekroze / dab

The Developer Laboratory
https://nekroze.github.io/dab
GNU General Public License v3.0
7 stars 17 forks source link

Fix group start command #409

Closed bencollerson closed 5 years ago

bencollerson commented 5 years ago

Reading repo and groups in a while loop can result in broken group configs if any of the repo apps read from stdin and so delete all subsequent repos or groups

Rozebot commented 5 years ago
Messages
:book: Thank you for submitting a PR, the community appreciates your work!

Generated by :no_entry_sign: dangerJS

Nekroze commented 5 years ago

Good catch, I do not entirely understand the failure case here but the change looks good. Merging to get the fix out but do you think this could be added to the feature tests to ensure no future regressions? or is it not reliably reproducible?

bencollerson commented 5 years ago

Seems to happen when a dab process is running through a while loop reading input from a file that in turn runs a child dab command inside the loop. The child dab command reads the rest of the stdin that the parent dab command was reading.

I am sure some sure some sort correctly nested dab commands could reproduce the error. The bug occurred twice for different projects at Jumbo, so should be reproducible.