ddev / ddev-drupal-contrib

DDEV integration for developing Drupal contrib projects
Apache License 2.0
62 stars 11 forks source link

How do I run `ddev poser` with no interaction? #31

Closed mbomb007 closed 2 weeks ago

mbomb007 commented 3 months ago

How do I run ddev poser with no interaction? Currently, it asks me to allow plugins.

...
Package operations: 168 installs, 0 updates, 0 removals
  - Downloading drupal/ctools (4.0.4)
  - Downloading drupal/token (1.13.0)
  - Installing composer/installers (v2.2.0): Extracting archive
  - Installing cweagans/composer-patches (1.7.3): Extracting archive
  - Installing drupal/core-composer-scaffold (10.2.3): Extracting archive
php-http/discovery contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins
Do you trust "php-http/discovery" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] 

In this comment, I can see that most ddev commands allow -y flag. There is also DDEV_NO_INTERACTION=TRUE environment variable. Neither of those work for ddev poser. In addition, there's no "help" argument for ddev poser to see what flags are available. If I run ddev poser -h or ddev poser --help, it just runs as if there was no flag.

Please consider adding a -y flag and help flags.

weitzman commented 2 weeks ago

You can set the composer env variable for no interaction https://getcomposer.org/doc/03-cli.md#composer-no-interaction

weitzman commented 2 weeks ago

PRs welcome for better help for our commands