Skip to content

Commit

Permalink
Merge pull request #240 from sudo-barun/exit-with-non-zero-status-cod…
Browse files Browse the repository at this point in the history
…e-when-hash-mismatch

exit with non-zero status code when hash mismatch
  • Loading branch information
Seldaek authored Feb 3, 2025
2 parents e44d08b + 6f80d1e commit 144adbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/download.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
To automate the installation, use <a href="/doc/faqs/how-to-install-composer-programmatically.md" title="See the instructions on how to install Composer programmatically" aria-label="See the instructions on how to install Composer programmatically">the guide on installing Composer programmatically</a>.
</p>
<pre class="installer">php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
php composer-setup.php
php -r "unlink('composer-setup.php');"</pre>

Expand Down

0 comments on commit 144adbe

Please sign in to comment.