saltstack-formulas / php-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
57 stars 231 forks source link

[BUG] php.composer requires interaction for latest versions #219

Closed an0nz closed 2 years ago

an0nz commented 3 years ago

Describe the bug On CentOS 8 and likely other distros with composer 2.0.7+ the php.composer state pauses requiring interaction, you can press enter for it to continue.

Error Received Do not run Composer as root/super user! See https://getcomposer.org/root for details Continue as root/super user [yes]?

Lines causing the issue https://github.com/saltstack-formulas/php-formula/blob/b73fffa4b5eec6b7610a47e9053fc13d1877f007/php/composer.sls#L53 https://github.com/saltstack-formulas/php-formula/blob/b73fffa4b5eec6b7610a47e9053fc13d1877f007/php/composer.sls#L55

Solution Add --no-interaction after --version Alternatively change to a non root user but for this particular command to get the version there is no risk running as root

B1ue-W01f commented 3 years ago

Can confirm on Debian too.

sticky-note commented 2 years ago

@an0nz Thanks for reporting this issue and sharing snippet

https://github.com/saltstack-formulas/php-formula/pull/233 resolves it.