Skip to content

Commit dc9bbd3

Browse files
committed
BUGFIX: use Guzzle to download from GitHub
1 parent 2a98094 commit dc9bbd3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Classes/Composer/InstallerScripts.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
namespace Flowpack\Prunner\Composer;
55

66
use Composer\Script\Event;
7+
use GuzzleHttp\Client;
78
use Neos\Utility\Files;
89
use PharData;
910

@@ -71,8 +72,10 @@ public static function postUpdateAndInstall(Event $event)
7172
echo '> Version: ' . $version . $versionMessage . "\n";
7273
echo '> Platform: ' . $platform . "\n";
7374
echo '> Architecture: ' . $architecture . "\n";
75+
76+
$httpClient = new Client();
7477
$downloadLink = sprintf('https://github.com/Flowpack/prunner/releases/download/v%s/prunner_%s_%s_%s.tar.gz', $version, $version, $platform, $architecture);
75-
$downloadedFileContents = file_get_contents($downloadLink);
78+
$downloadedFileContents = $httpClient->get($downloadLink)->getBody()->getContents();
7679
echo '> Download complete.' . "\n";
7780

7881
file_put_contents('Data/Temporary/prunner.tar.gz', $downloadedFileContents);

0 commit comments

Comments
 (0)