File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
setup/src/Magento/Setup/Model/Cron Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,20 @@ public function execute()
63
63
$ arguments [AbstractCacheManageCommand::INPUT_KEY_TYPES ] = explode (' ' , $ this ->params [0 ]);
64
64
}
65
65
$ arguments ['command ' ] = 'cache:enable ' ;
66
- $ definition = new InputDefinition ([
67
- new InputArgument (AbstractCacheManageCommand::INPUT_KEY_TYPES , InputArgument::REQUIRED ),
68
- new InputArgument ('command ' , InputArgument::REQUIRED ),
69
- ]);
70
-
71
- $ this ->command ->setDefinition ($ definition );
66
+ $ inputDefinition = [];
67
+ if ($ this ->command ->getDefinition ()->hasArgument ('command ' )) {
68
+ $ inputDefinition [] = new InputArgument ('command ' , InputArgument::REQUIRED );
69
+ }
70
+ if ($ this ->command ->getDefinition ()->hasArgument (AbstractCacheManageCommand::INPUT_KEY_TYPES )) {
71
+ $ inputDefinition [] = new InputArgument (
72
+ AbstractCacheManageCommand::INPUT_KEY_TYPES ,
73
+ InputArgument::REQUIRED
74
+ );
75
+ }
76
+ if (!empty ($ inputDefinition )) {
77
+ $ definition = new InputDefinition ($ inputDefinition );
78
+ $ this ->command ->setDefinition ($ definition );
79
+ }
72
80
} else {
73
81
$ arguments ['command ' ] = 'cache:disable ' ;
74
82
}
You can’t perform that action at this time.
0 commit comments