Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module:status cannot be grepped without -n option #1422

Open
amenk opened this issue Mar 1, 2024 · 9 comments
Open

module:status cannot be grepped without -n option #1422

amenk opened this issue Mar 1, 2024 · 9 comments

Comments

@amenk
Copy link
Contributor

amenk commented Mar 1, 2024

Feature description

Can't grep on module:status

Problem and motivation

I often want to see the name of a certain module and do something like

n98-magerun2 module:status | grep Friendly

This does not work. It still displays the full list.

Adding -n (no-interaction) helps:

n98-magerun2 module:status -n |grep Friendly

For

n98-magerun2 route:list

grep does work

Is this something you're interested in working on

Eventually

@cmuench
Copy link
Member

cmuench commented Apr 27, 2024

@amenk Just saw that module:status is not a Magerun command. It's part of the Magento core.
New idea... We could add the module status to the dev:module:list command.

cmuench added a commit to cmuench/n98-magerun2 that referenced this issue Apr 27, 2024
@amenk
Copy link
Contributor Author

amenk commented Apr 27, 2024

@cmuench But

$ bin/magento module:status -n |grep Friendly
IMI_FriendlyCaptcha

works - so it might be a general problem when calling built-in Magento commands?

cmuench added a commit that referenced this issue Apr 27, 2024
@cmuench
Copy link
Member

cmuench commented Apr 27, 2024

@amenk This should also with in the latest n98-magerun2 version.

@cmuench
Copy link
Member

cmuench commented Apr 27, 2024

Just tested in the Magerun ddev.
grafik

@amenk
Copy link
Contributor Author

amenk commented Apr 27, 2024

Shame on me, I tested with an older version, which is most probably the reason. Closing for now

@amenk amenk closed this as completed Apr 27, 2024
@amenk
Copy link
Contributor Author

amenk commented Apr 27, 2024

Had some time to test now - I updated to the recent n98-magerun2 unstable - n98-magerun2 7.4.0 (commit: 2404a79)

n98-magerun2 module:status | grep Friendly

still displays the full list.

If I add -n it works - like in your screenshot.

I think there is a misunderstanding: The report is all about the fact, that -n needs to be added as a workaround.

bin/magento module:status does not need the -n flag to be able to grep the output.

This is not very high priority, because there is a workaround. But still it's confusing :-)

@amenk amenk reopened this Apr 27, 2024
@cmuench cmuench changed the title module:status cannot be grepped module:status cannot be grepped without -n option Apr 28, 2024
@cmuench
Copy link
Member

cmuench commented Sep 2, 2024

Did some investigations and found a relation to the line $process->setTty($input->isInteractive()); in MagentoCoreProxyCommand, but still did not find a solution.

@cmuench
Copy link
Member

cmuench commented Sep 2, 2024

@amenk switching from TTY to PTY mode could help.
https://symfony.com/doc/current/components/process.html#using-tty-and-pty-modes

First tests look promising.

@cmuench
Copy link
Member

cmuench commented Sep 2, 2024

Sadly the interaction does not work correct with setPty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants