Exclude transient from list#122
Conversation
It will display only when we pass --transient to command
|
Thanks for the PR, @BhargavBhandari90 ! Can you add another test that makes use of the flag you've added, to make sure transients are shown in that case? |
|
@schlessera The test for I have added a new test for |
|
Hey @schlessera it's showing I think build needs to be restarted again. Not sure about hat |
|
Restarted that for you... |
|
Thanks @gitlost . It worked. |
|
@schlessera Added a test. |
|
@BhargavBhandari90 I'm sorry, I only realized just now that you have used the wrong mechanism to include the default transient. You shouldn't set the Instead, you should change the logic in https://github.com/wp-cli/entity-command/blob/master/src/Option_Command.php#L280-L287 and provide a default value of $show_transients = Utils\get_flag_value( $assoc_args, 'transients', false );
if ( $show_transients ) {
$transients_query = " AND option_name LIKE '\_transient\_%'
OR option_name LIKE '\_site\_transient\_%'";
} else {
$transients_query = " AND option_name NOT LIKE '\_transient\_%'
AND option_name NOT LIKE '\_site\_transient\_%'";
} |
|
@schlessera Oh !!! Got it. Will make the change in this weekend. Thanks. |
522301d to
2c7a9a3
Compare
|
Sending new PR. I merged |
For: #121