Commit 3087cfc0 authored by Stephan Großberndt's avatar Stephan Großberndt

[BUGFIX] Fix handling of result in update-packagist.org hook

parent a4270a5c
......@@ -38,18 +38,12 @@ if ($result === 0 && !empty($composerJson)) {
$url = sprintf('curl -X PUT -d username=%s -d apiToken=%s -d update=1 --silent https://packagist.org/packages/%s',
'typo3', // Packagist username
getenv('HOOK_TOKEN_packagist'), // API Token
$composerJson->name
escapeshellarg($composerJson->name)
);
exec($url, $result);
$message = 'something unexpected went wrong';
if (!empty($result)) {
$message = implode("\n", $result);
}
echo chr(10);
echo 'Update ' . $composerJson->name . ' on packagist.org returned: ' . $message;
echo chr(10);
echo PHP_EOL . 'Update ' . $composerJson->name . ' on packagist.org returned: ' . $result . PHP_EOL;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment