overtrue / phplint

:bug: A tool that can speed up linting of php files by running several lint processes at once.
MIT License
984 stars 118 forks source link

Got an error when I try to use docker image. #119

Closed beeyev closed 2 years ago

beeyev commented 2 years ago

Here is the config I use for gitlab ci

check:phplint:
  image: overtrue/phplint:8.0
  allow_failure: true
  script:
    - /root/.composer/vendor/bin/phplint ./

And here is the error i get

Using docker image sha256:c79e52f3b55942238ca5c3f21ddecc31974fecbb0bde113d45a9b94e1eeb4abb for overtrue/phplint:8.0 with digest overtrue/phplint@sha256:1694e865b89ba3e4ca03c11a84bff4b79c68cf05fd14e1f39604b8c6202efaf6 ...
+ '[' '!' -z  ]
+ sh -c '/root/.composer/vendor/bin/phplint sh -c if [ -x /usr/local/bin/bash ]; then
    exec /usr/local/bin/bash 
elif [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash 
elif [ -x /bin/bash ]; then
    exec /bin/bash 
elif [ -x /usr/local/bin/sh ]; then
    exec /usr/local/bin/sh 
elif [ -x /usr/bin/sh ]; then
    exec /usr/bin/sh 
elif [ -x /bin/sh ]; then
    exec /bin/sh 
elif [ -x /busybox/sh ]; then
    exec /busybox/sh 
else
    echo shell not found
    exit 1
fi
'
sh: syntax error: unexpected "then"

It seems like there is a bug inside the docker image, could you please check it?

overtrue commented 2 years ago

FYI: https://github.com/overtrue/phplint/issues/116