From 50d6c5c622e6572f017772cfc2d43095f355e9c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCthler?= Date: Mon, 12 Jun 2023 15:55:59 +0200 Subject: [PATCH] Use absolute path to call psalm (#3) Since three weeks, calling `psalm` in the `entrypoint.sh` script doesn't work anymore, the binary is not found, as though `PATH` is expanded to `/composer/vendor/bin` in the `Dockerfile`. I hove no idea why that is, but it should be better to call `/composer/vendor/bin/psalm` by it's absolute path anyways. --- Dockerfile | 2 -- entrypoint.sh | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7cd4a7c..4b10244 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,8 +12,6 @@ COPY --from=build-extensions /usr/local/lib/php /usr/local/lib/php COPY --from=build-extensions /usr/local/etc/php /usr/local/etc/php COPY --from=composer-fetch /composer /composer -ENV PATH /composer/vendor/bin:${PATH} - # Satisfy Psalm's quest for a composer autoloader (with a symlink that disappears once a volume is mounted at /app) RUN mkdir /app && ln -s /composer/vendor/ /app/vendor diff --git a/entrypoint.sh b/entrypoint.sh index eca9492..6d74b5b 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/sh -l set -e -psalm --threads=$(nproc) "$@" +/composer/vendor/bin/psalm --threads=$(nproc) "$@"