Add check on exec() method during installation

apply this PR https://github.com/akeneo/pim-community-dev/commit/7fac5efb47e0abaf51400020cad7ffe796013108