-
-
Save fjogeleit/d52776f99905f73b309b5147d4f659e2 to your computer and use it in GitHub Desktop.
/usr/local/bin/composer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
PHP=/usr/local/opt/php70/bin/php | |
ARGUMENTS="--ignore-platform-reqs --optimize-autoloader" | |
EXCLUDE_COMMANDS=(init selfupdate dumpautoload diagnose) | |
for item in "${EXCLUDE_COMMANDS[@]}"; do | |
if [[ $1 == "$item" ]]; then ARGUMENTS=""; fi | |
done | |
echo "Running composer with $($PHP -v)" | |
$PHP -d allow_url_fopen=On -d detect_unicode=Off -d memory_limit=-1 /usr/local/opt/composer/libexec/composer.phar $ARGUMENTS "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment