From ab6125be5086c3e5fd280ee31e1ebc4dfdb1586e Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov Date: Sat, 15 Oct 2016 15:47:47 +0200 Subject: [PATCH] ~ changes to the way we deal with curl insecure on windows (#163) --- README.md | 4 +++- RoboFile.dist.ini | 3 +++ RoboFile.php | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 770df6c..1d56116 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/RoboFile.dist.ini b/RoboFile.dist.ini index 7586ede..b367398 100644 --- a/RoboFile.dist.ini +++ b/RoboFile.dist.ini @@ -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 \ No newline at end of file diff --git a/RoboFile.php b/RoboFile.php index c92ada8..db823e2 100644 --- a/RoboFile.php +++ b/RoboFile.php @@ -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'); } }