Closed arjankowski closed 7 months ago
The SearchCommand
was not working correctly when executing bulk actions, whereas it worked fine for single executions.
When executing a bulk command, parameters are prepared separately for each data row, and for this purpose, the _addFlagToArgv
function from box-command.js
is called. In its logic, this function checks the type of the passed argument, this.constructor.flags[flag].type === 'boolean'
. For it to work correctly, the checked flag must be added to the flag list of the given command.
However, in our case, SearchCommand.flags
did not have the max-items
flag, which is added manually into the body of the run
function, and that's why we were getting the error:
TypeError: Cannot read property 'type' of undefined
To fix this, I've added the max-items
flag to the SearchCommand
so that the existing mechanism would work correctly. However, I set this flag to hidden
so that it is not visible to the user.
Pull Request Test Coverage Report for Build 8523388514
Details
💛 - Coveralls