Merge branch '2.6'
commit
d3aeb1357f
|
@ -223,6 +223,15 @@ abstract class BaseCommand extends Command
|
|||
// initialize a plugin-enabled Composer instance, either local or global
|
||||
$disablePlugins = $input->hasParameterOption('--no-plugins');
|
||||
$disableScripts = $input->hasParameterOption('--no-scripts');
|
||||
|
||||
$application = parent::getApplication();
|
||||
if ($application instanceof Application && $application->getDisablePluginsByDefault()) {
|
||||
$disablePlugins = true;
|
||||
}
|
||||
if ($application instanceof Application && $application->getDisableScriptsByDefault()) {
|
||||
$disableScripts = true;
|
||||
}
|
||||
|
||||
if ($this instanceof SelfUpdateCommand) {
|
||||
$disablePlugins = true;
|
||||
$disableScripts = true;
|
||||
|
|
|
@ -659,6 +659,16 @@ class Application extends BaseApplication
|
|||
return $this->initialWorkingDirectory;
|
||||
}
|
||||
|
||||
public function getDisablePluginsByDefault(): bool
|
||||
{
|
||||
return $this->disablePluginsByDefault;
|
||||
}
|
||||
|
||||
public function getDisableScriptsByDefault(): bool
|
||||
{
|
||||
return $this->disableScriptsByDefault;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return 'prompt'|bool
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue