Ssh/scp task: Move ssh2_connect checking from init to main
|Reported by:||petr@…||Owned by:||mrook|
Because the ssh task contains checking for ssh2_connect function in the init function the build fails if the ssh extension is not installed no matter whether the ssh task is actually used in the current target(s) or not.
This causes troubles/build failures where the build file is used in different environments and on some of them we don't actually need/want to have the ssh php extension installed. For example we create an installation package in the integration environment which is then shifted using ssh to the production server where phing is used to do deploy. So ssh is needed on the source box but it is not needed on the target box but phing forces us to have installed on the target box too.
Would it be possible to move the ssh extension checking from init to main so it is only done when the task is actually called?