bestit / ShopwareMageTasks

Common tasks to deploy a shopware project using MagePHP.
MIT License
6 stars 5 forks source link

Add option to ignore the process return value in the sw command call #48

Closed bestit-knoop closed 5 years ago

bestit-knoop commented 5 years ago

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.

bestit-el-bardan commented 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?

bestit-knoop commented 5 years ago

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

bestit-el-bardan commented 5 years ago

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 :)

bestit-knoop commented 5 years ago

I have extended the readme with this use case