Closed bestit-knoop closed 5 years ago
Isn't there a better way to solve this issue? Perhaps by checking the actual exit status code. Does it differ when a plugin is installed and when there is an actual error?
In this explicit command shopware will return 0 if the plugin could be installed and 1 if the plugin is already installed or the plugin does not exist. The same return values will be used in other command.
I don't see another clean way to detect if the command will throw an error.
The example command is here: https://github.com/shopware/shopware/blob/5.5/engine/Shopware/Commands/PluginInstallCommand.php
Hmm, all right. Can you include this in the readme with a warning that this should be avoided unless it is absolutely necessary, then we're good to go :)
I have extended the readme with this use case
Add on additional option for the shopware command task to ignore the process return value. This value can indicate an error even if the shopware commands executes sucessfully.
Example:. sw:plugin:install will return an error return code if the plugin is already installed.