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

Do not show error that plugins have been disabled when they are already disabled #11803

Merged
merged 1 commit into from Feb 7, 2024

Conversation

kubawerlos
Copy link
Contributor

Current behaviour is to, no matter --no-plugins is used or not, to show the error, this is from main branch:

$ ./bin/compile
$ sudo php composer.phar -n --version
Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 2.7-dev+4e5be9ee7d924d8efc58d676439b0c7bd18a9ce4 (2.7-dev) 2024-01-12 13:20:59
$ sudo php composer.phar -n --version --no-plugins
Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 2.7-dev+4e5be9ee7d924d8efc58d676439b0c7bd18a9ce4 (2.7-dev) 2024-01-12 13:20:59

After this change only when --no-plugins is NOT used, to show the error:

$ ./bin/compile
$ sudo php composer.phar -n --version
Composer plugins have been disabled for safety in this non-interactive session. Set COMPOSER_ALLOW_SUPERUSER=1 if you want to allow plugins to run as root/super user.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 2.7-dev+4e5be9ee7d924d8efc58d676439b0c7bd18a9ce4 (2.7-dev) 2024-01-12 13:20:59
$ sudo php composer.phar -n --version --no-plugins
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 2.7-dev+4e5be9ee7d924d8efc58d676439b0c7bd18a9ce4 (2.7-dev) 2024-01-12 13:20:59

@Seldaek Seldaek merged commit 7745d56 into composer:main Feb 7, 2024
20 checks passed
@Seldaek
Copy link
Member

Seldaek commented Feb 7, 2024

Makes sense thanks

@Seldaek Seldaek added this to the 2.7 milestone Feb 7, 2024
@Seldaek Seldaek added the Bug label Feb 7, 2024
@kubawerlos kubawerlos deleted the do_not_show_info branch February 7, 2024 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants