Conversation
| this.repository = new Repository(); | ||
| this.progressBar = progressBar; | ||
| this.logger = logger; | ||
| this.concurrency = (!flags || flags.concurrency === undefined) ? 4 : flags.concurrency; |
There was a problem hiding this comment.
(!flags ||
I'm pretty sure flags is always an object
I think you can just do:
flags.concurrency || 4There was a problem hiding this comment.
It was broken in the tests actually – flags was null. I imagine that'd also be the case if you used commands programatically.
I also check for undefined specifically so that it's not 0 || 4, so that if you specify 0 you get an error, rather than it just using 4.
There was a problem hiding this comment.
I think it is good that it would throw, however I think me might need to add a test to make sure it doesn't accidentally get refactored away the next time somebody reads over that code?!
|
Nice, thanks |
|
I updated the branch in #170 and also added a few tests around the empty/NaN/negative concurrency. |
|
Merged in #170 |
|
This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #162