From efb1bd3d28dcbb55dbffa4d9ab88f49adcf85f33 Mon Sep 17 00:00:00 2001 From: TheWitness Date: Fri, 18 Sep 2026 01:36:54 -0400 Subject: [PATCH] ci: run composer commands with sudo in plugin CI workflow The Pest install step in .github/workflows/plugin-ci-workflow.yml now runs composer config, composer require, rm, and composer install with sudo so the step can write to directories owned by another user in the CI runner. Also drop the deprecated --dev flag from composer require. --- .github/workflows/plugin-ci-workflow.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugin-ci-workflow.yml b/.github/workflows/plugin-ci-workflow.yml index 8e9a996..35bb2c6 100644 --- a/.github/workflows/plugin-ci-workflow.yml +++ b/.github/workflows/plugin-ci-workflow.yml @@ -132,10 +132,10 @@ jobs: run: | cd ${{ github.workspace }}/cacti if [ -f composer.json ]; then - composer config --no-plugins allow-plugins.pestphp/pest-plugin true - composer require --dev --no-progress --no-interaction "pestphp/pest: ^3" "pestphp/pest-plugin-drift: ^3.0" - rm -f composer.lock - composer install --dev --no-progress + sudo composer config --no-plugins allow-plugins.pestphp/pest-plugin true + sudo composer require --no-progress --no-interaction "pestphp/pest: ^3" "pestphp/pest-plugin-drift: ^3.0" + sudo rm -f composer.lock + sudo composer install --dev --no-progress fi - name: Create Cacti config.php