Hello,

I think I might have found a not normal behaviour of the pecl command.

In our Dockerfiles we installed packages this way :

pecl install pkg1 pkg2 pkg3

PROBLEM is when one install fail, the command still returns a zero return code.


Steps to reproduce with the latest php docker container bellow :


mmaurice@bogota:~$ docker run --rm -it php bash
root@a92c95266ddd:/# pecl install redis badpackage >/tmp/mylog </dev/null
root@a92c95266ddd:/# echo $?
0
root@a92c95266ddd:/# pecl install redis badpackage >/tmp/mylog </dev/null
root@a92c95266ddd:/# echo $?
1
root@a92c95266ddd:/#

Let me know if you think it's a bug I will open a bug.

For now we ended up changing our install code to :

for pkg in ${PECL_PACKAGES}; do pecl install $pkg; done


Thanks in advance,

Marc


--

        Clever Age - make it clever <https://www.clever-age.com>

Marc MAURICE

DevOps

Facebook <https://www.facebook.com/cleverage> Twitter <https://twitter.com/CleverAge> Youtube <https://www.youtube.com/c/CleverAgeParis> LinkedIn <https://fr.linkedin.com/company/clever-age>

Agence de Toulouse

Tel : +33 9 70 71 15 24 <tel:+33 9 70 71 15 24> Standard : +33 5 61 82 58 86 <tel:+33 5 61 82 58 86>

Clever Age - make it clever <https://www.couleur-citron.com/clever-signature-2022-02/lien/>

Reply via email to