~ changes to the way we deal with curl insecure on windows (#163)

This commit is contained in:
Daniel Dimitrov 2016-10-15 15:47:47 +02:00 committed by Jelle Kok
parent ede97061b7
commit ab6125be50
3 changed files with 13 additions and 2 deletions

View File

@ -70,7 +70,9 @@ Note: the first parameter is used by Travis and you should always set it to "0"
You need to install:
- Git for windows (https://msysgit.github.io/)
- GitHub for windows (https://windows.github.com/)
- Curl for Windows if necesssary.
- Curl for Windows if necessary.
- for complete list of necessary software and tips check this [wiki page](https://github.com/joomla-extensions/weblinks/wiki/Programs-needed-on-Windows-to-get-the-tests-running)
Note: For commands line is better if you use the 'Git shell' program.

View File

@ -11,3 +11,6 @@ branch = staging
; (Linux / Mac only) If you want to set a different owner for the CMS root folder, you can set it here.
localUser = www-data
; Set this to true, if your curl binaries are not able to create an https connection
insecure = false

View File

@ -442,7 +442,13 @@ class RoboFile extends \Robo\Tasks
// Make sure we have Composer
if (!file_exists('./composer.phar'))
{
$insecure = $this->isWindows() ? ' --insecure' : '';
$insecure = '';
if (!empty($this->configuration->insecure))
{
$insecure = '--insecure';
}
$this->_exec('curl ' . $insecure . ' --retry 3 --retry-delay 5 -sS https://getcomposer.org/installer | php');
}
}