Skip to content

Commit

Permalink
Use absolute path to call psalm (#3)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
relthyg authored Jun 12, 2023
1 parent f311c83 commit 50d6c5c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh -l
set -e

psalm --threads=$(nproc) "$@"
/composer/vendor/bin/psalm --threads=$(nproc) "$@"

0 comments on commit 50d6c5c

Please sign in to comment.