From 5dbd6a6521cba55b4a2b580efb94f29d64236f6d Mon Sep 17 00:00:00 2001 From: Bernd Sengupta Date: Tue, 15 Oct 2024 14:44:53 +0200 Subject: [PATCH] [BUG] Add condition in runTests.sh and extend the composer command --- Build/Scripts/runTests.sh | 4 +++- composer.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index eafcd5d..7af397c 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -437,6 +437,8 @@ fi if [ "$(uname)" != "Darwin" ] && [ "${CONTAINER_BIN}" == "docker" ]; then # Run docker jobs as current user to prevent permission issues. Not needed with podman. USERSET="--user $HOST_UID" + elif [ "$(uname)" == "Darwin" ] && [ "${CONTAINER_BIN}" == "docker" ]; then + USERSET="--user=$(id -u):$(id -g)" fi if ! type ${CONTAINER_BIN} >/dev/null 2>&1; then @@ -537,7 +539,7 @@ case ${TEST_SUITE} in docsGenerate) mkdir -p Documentation-GENERATED-temp chown -R ${HOST_UID}:${HOST_PID} Documentation-GENERATED-temp - ${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --user=$(id -u):$(id -g) --pull always ${USERSET} -v "${ROOT_DIR}":/project ${IMAGE_DOCS} --config=Documentation --fail-on-log + ${CONTAINER_BIN} run ${CONTAINER_INTERACTIVE} --rm --pull always ${USERSET} -v "${ROOT_DIR}":/project ${IMAGE_DOCS} --config=Documentation --fail-on-log SUITE_EXIT_CODE=$? ;; shellcheck) diff --git a/composer.json b/composer.json index 4a65349..fc07512 100644 --- a/composer.json +++ b/composer.json @@ -173,7 +173,7 @@ "ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language", "ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint", "coverage:create-directories": "mkdir -p build/coverage build/logs", - "docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation", + "docs:generate": "docker run --rm --user=$(id -u):$(id -g) -v $(pwd):/project ghcr.io/typo3-documentation/render-guides:latest --progress --config ./Documentation", "fix:composer:normalize": "@composer normalize --no-check-lock", "fix:php": [ "@fix:php:rector",