Просмотр исходного кода

Install composer v1 by default

Switching to v2 can be done by running

https://blog.packagist.com/composer-2-0-is-now-available/
Robert Zollner 5 лет назад
Родитель
Сommit
8cfeaa4d43
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      bin/v-add-user-composer
  2. 1 1
      web/src/app/System/HestiaApp.php

+ 1 - 1
bin/v-add-user-composer

@@ -73,7 +73,7 @@ if [[ "$signature" != $(sha384sum $COMPOSER_SETUP_FILE | cut -f 1 -d " ") ]]; th
     check_result $E_INVALID "Composer signature does not match"
 fi
 
-COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php "$COMPOSER_SETUP_FILE" --quiet --install-dir="$COMPOSER_DIR" --filename=composer
+COMPOSER_HOME="$HOMEDIR/$user/.config/composer" user_exec /usr/bin/php "$COMPOSER_SETUP_FILE" --1 --quiet --install-dir="$COMPOSER_DIR" --filename=composer
 check_result $? "Composer install failed"
 
 [ -f "$COMPOSER_SETUP_FILE" ] && rm -f "$COMPOSER_SETUP_FILE"

+ 1 - 1
web/src/app/System/HestiaApp.php

@@ -69,7 +69,7 @@ class HestiaApp {
         }
 
         $install_folder = $this->getUserHomeDir() . DIRECTORY_SEPARATOR . '.composer';
-        $this->runUser('v-run-cli-cmd', ["/usr/bin/php", $composer_setup, "--quiet", "--install-dir=".$install_folder, "--filename=composer" ], $status);
+        $this->runUser('v-run-cli-cmd', ["/usr/bin/php", $composer_setup, "--1", "--quiet", "--install-dir=".$install_folder, "--filename=composer" ], $status);
 
         unlink($composer_setup);