From 4e4bbebc1c0c742d4c9be6e666a38b1d47d71496 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 30 Dec 2022 14:17:46 +1100 Subject: [PATCH] install: add support for skipping composer install Allows folks to opt out of installing composer at install time. --- README.md | 2 ++ bin/install | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e043afd..16dbdba 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ asdf reshim php-cs-fixer --version ``` +You can skip installing composer by prefixing your install command with `PHP_INSTALL_COMPOSER=no`. + ## License Licensed under the diff --git a/bin/install b/bin/install index c40be12..34a8ee4 100755 --- a/bin/install +++ b/bin/install @@ -410,4 +410,6 @@ get_php_version() { } install_php "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH" -install_composer "$ASDF_INSTALL_PATH" +if [ "${PHP_INSTALL_COMPOSER:-yes}" == "yes" ]; then + install_composer "$ASDF_INSTALL_PATH" +fi