composer icon indicating copy to clipboard operation
composer copied to clipboard

[ENHANCEMENT] New option "clone-response" or "discard-changes" to answer question [Y, n, s, v]

Open df-jablan opened this issue 13 years ago • 2 comments

This would be awesome. So awesome I might code it!

However, the idea is:

$ composer update --discard-changes # local clones always overwritten

or

$ composer update --clone-response=s   # always stash local clones when asked. puke on error as usual

Let Composer answer the question because sometimes (frequently), I want to overwrite everything, or stash, or something else I've not thought of. Unfortunately, it is annoying not being able to do this.

df-jablan avatar Jul 13 '13 22:07 df-jablan

This is possible via the discard-changes option, which has to be combined with -n / --no-interaction. There is indeed no way to do this for only one run though, but I'd rather have a COMPOSER_DISCARD_CHANGES env var for this case than a new CLI flag, because CLI flags need to be propagated everywhere and they're quite painful, while env vars can simply be handled in the config class.

Seldaek avatar Jul 15 '13 08:07 Seldaek

Good to know. I scoured the doc for 20 minutes before posting that.

Understood. When I get some free time I will check it out. On Jul 15, 2013 4:04 AM, "Jordi Boggiano" [email protected] wrote:

This is possible via the discard-changes optionhttp://getcomposer.org/doc/04-schema.md#config, which has to be combined with -n / --no-interaction. There is indeed no way to do this for only one run though, but I'd rather have a COMPOSER_DISCARD_CHANGES env var for this case than a new CLI flag, because CLI flags need to be propagated everywhere and they're quite painful, while env vars can simply be handled in the config class.

— Reply to this email directly or view it on GitHubhttps://github.com/composer/composer/issues/2083#issuecomment-20956193 .

df-jablan avatar Jul 16 '13 03:07 df-jablan